Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage.googleapis.com might not be an optimal CDN #52

Closed
jeffposnick opened this issue Jun 12, 2019 · 4 comments
Closed

storage.googleapis.com might not be an optimal CDN #52

jeffposnick opened this issue Jun 12, 2019 · 4 comments

Comments

@jeffposnick
Copy link

Congrats on the Pika CDN launch!

I noticed that you're using the Google Storage API under the hood, with URLs like https://cdn.pika.dev/workbox-window/v4 redirecting to https://storage.googleapis.com/pika-web-packages-01/workbox-window/4.3.1/dist-es2019/workbox-window.min.js

We (the Workbox team) use the Google Storage API in a similar manner, but I thought it was worth pointing out that this is actually a bit slower, and likely more expensive than using a "real" CDN solution. My understanding is that you end up charged for a call to the Google Storage API each time one of those URLs are requested, and you can end up incurring a decent amount of usage charges when what you expect is static hosting.

We've had a longstanding goal to move to a real CDN, perhaps along the lines of the instructions at https://cloud.google.com/load-balancing/docs/https/adding-a-backend-bucket-to-content-based-load-balancing, but haven't yet found the time to do it.

I figured I'd at least mention it to your team since to the uninitiated, storage.googleapis.com kinda-sorta looks acts like a static CDN. (Though the "googleapis" bit is a giveaway.)

@FredKSchott
Copy link
Owner

Hey @jeffposnick, thanks for the message! I'm in a similar boat: just haven't had the time yet to move to a proper, edge-cached CDN and wanted to get this released sooner rather than later. It's a multi-regional US bucket so I assume US performance is good, but I'm excited to get it on a real CDN so that international folks get a better experience.

I'm also reaching out to partners like Google, Cloudflare, etc. to help sponsor the CDN & support the server costs. Is there anyone at Google who you could connect me to who would be interested in speaking about that? Happy to follow up with you via twitter as well.

@tadeuszwojcik
Copy link

@FredKSchott I think you could use Cloudflare free plan with unlimited bandwidth and still use GCS as origin.
I think that's what https://unpkg.com/ does.

@SukkaW
Copy link

SukkaW commented Jun 24, 2019

@tadeuszwojcik Cloudflare is a great, but

  1. unpkg is using Cloudflare Business Plan, not Free Plan.
  2. Cloudflare is not friendly to some regions, for instance China.

@FredKSchott
Copy link
Owner

Thanks everyone for the discussion! I'm in contact with both Cloudflare & Google about getting a sponsored account. Closing this since it isn't @pika/web related, but feel free to move the convo over to https://spectrum.chat/pika.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants