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

Speed up WebTorrent Desktop downloads with a CDN #108

Open
feross opened this issue Sep 27, 2016 · 8 comments
Open

Speed up WebTorrent Desktop downloads with a CDN #108

feross opened this issue Sep 27, 2016 · 8 comments

Comments

@feross
Copy link
Member

feross commented Sep 27, 2016

GitHub is silly slow. I bet they're throttling us, since we're using around 600GB of bandwidth per month at the moment. We've received 2 reports of this, and I just experienced a crawling download on a 40Mbps connection. I bet this is affecting our download rates.

Looking into Fastly and MaxCDN at the moment: https://twitter.com/feross/status/780555558713643008

If neither of those can offer us free CDN, then we can try CloudFlare.

@grunjol
Copy link

grunjol commented Sep 27, 2016

With a decent CDN we can create a simple deb repository to provide a native update system for Debian/Ubuntu users.

@feross
Copy link
Member Author

feross commented Sep 27, 2016

@grunjol Do you have a link so I can learn about deb repositories?

@grunjol
Copy link

grunjol commented Sep 27, 2016

You can check the offiical doc here https://wiki.debian.org/HowToSetupADebianRepository

@grunjol
Copy link

grunjol commented Sep 27, 2016

All the alternatives in the page require a linux installation to run. A month ago I started a node project (not published) to create a simple deb repository, is not functional yet, but i think I can squeeze some time next week to make it happen.

@feross
Copy link
Member Author

feross commented Sep 27, 2016

@grunjol Nice effort -- that would be great to have! Worst case, we can run those commands on the linux server that powers webtorrent.io each time we do a release, but it would be best to have something cross-platform.

@feross
Copy link
Member Author

feross commented Sep 30, 2016

Still waiting on Fastly, MaxCDN, and Cloudflare to get back to me with a free CDN account.

In the meantime, I've enabled CloudFlare on the webtorrent.io site, on the Free plan, to evaluate it. Downloads are still linked to github.com in the meantime. DNS propagation will take ~24 hours.

@feross
Copy link
Member Author

feross commented Sep 30, 2016

@dcposch I just realized that if we put Cloudflare in front of GitHub releases, then our download stats will get messed up since we pull those numbers from the GitHub API right now.

We probably want to track downloads differently. Most sites seem to direct users to a new page after they click "Download".

See https://www.mozilla.org/en-US/firefox/new/ for example. Then, we can just track hits to that page directly on the server-side.

Thoughts?

@feross
Copy link
Member Author

feross commented Sep 30, 2016

We also will need to tell Cloudflare to cache our downloads, since they don't do it for .exe, .dmg, etc. by default:

Which file extensions does CloudFlare cache for static content?
https://support.cloudflare.com/hc/en-us/articles/200172516-Which-file-extensions-does-CloudFlare-cache-for-static-content-

Instructions to add new cache rules, e.g. for static HTML
https://support.cloudflare.com/hc/en-us/articles/200172256

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

No branches or pull requests

2 participants