Ask HN: My GitHub Pages site went viral. 120k requests and 6 gigs. What do I do?

30 points by yeahgoodok ↗ HN
So I built nesteggly.com. Literally an MVP I cooked up over the past couple of months to help my gf plan her retirement. Being a 100% static website and not thinking many people would find it very interesting I decided to host it on GitHub Pages.

Fast forward to the last 24 hours. I've had over 120,000 page views and 6 gigs of bandwidth consumed. Fortunately I'd just set up Cloudflare and GitHub only delivered about 2 gigs of that. I haven't received a call from GitHub yet and my site seems to still be up and responsive.

The questions at the top of my mind:

Is this an appropriate use of GitHub Pages?

Should I be concerned they'll shut me down?

What's the best way to host a 100% static site?

18 comments

[ 5.7 ms ] story [ 43.9 ms ] thread
If GitHub pages starts complaining about bandwidth, most of the cloud providers have a way of using their storage buckets (S3 for AWS) as static websites.
So just wait until GitHub emails me and then figure it out?
If what you're getting is a temporary spike because you were linked somewhere, then that seems like the way to do it. If you're expecting that much traffic as an ongoing thing, then maybe be proactive.
Just to expand on this, you can use Google's Firebase or Cloud Buckets to host a static website.
> GitHub Pages sites have a soft bandwidth limit of 100GB per month... if your site exceeds these usage quotas, we may not be able to serve your site, or you may receive a polite email from GitHub Support or GitHub Premium Support suggesting strategies for reducing your site's impact on our servers, including putting a third-party content distribution network (CDN) in front of your site, making use of other GitHub features such as releases, or moving to a different hosting service that might better fit your needs.

https://help.github.com/en/github/working-with-github-pages/...

> we may not be able to serve your site

That's not very comforting.

I don't think they meant to say they can't do it, more that they don't want people to use github pages for those use cases, otherwise a lot of people would move their high bandwidth and relatively expensive to host sites to github. I might be wrong though.
This explains it:

> GitHub Pages is not intended for or allowed to be used as a free web hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS).

https://help.github.com/en/github/working-with-github-pages/...

Probably be better to move to Netlify than risk an outage, it's like a commercial version of GHPages with a very generous free-tier. Should be very easy to setup too.
Congratulations! You hit the HN front page is what I see in your tweets attached to the page. But in a couple of days that traffic should be history . There are a lot of software project pages being hit by HN hug of death on many occasions (e.g. version release) and they still serve from GH. Cloudflare CDN was the right move and should be enough in my opinion.
I know services like netlify exist to host static stuff BUt for a very simple static site, I would literally get a decent VPS ($5-10/month) and setup nginx to host it. Add cloudflare in front and you can server tons of traffic as cloudflare will pretty much cache everything.
I agree, I have a few sites set up on one VPS server with Nginx virtual hosts and cloudfront.
Your site is very clean and minimal
I would like to learn - how did you launch your website, to reach the viewership you did?
AWS s3 is a great way of hosting static sites with high scalability.

I once experimented hosting my ghost blog on AWS s3 at http://viral.santoshsrinivas.com/

Just in case I happened to make anything worth virality ;-)

As many have asked, how did you manage to get your site go viral ;-)?