Ask HN: Did your website get the HN/Reddit hug? What did you do?
Just curious, for the typical HN/Reddit traffic spike what does it take to survive? Interested in both raw numbers or broader strategies. If you shrugged it off no problem, what does your architecture look like? If not, what did you do afterwards if anything?
10 comments
[ 3.7 ms ] story [ 27.5 ms ] threadSource: https://news.ycombinator.com/item?id=16186329 and https://www.reddit.com/r/programming/comments/7rgz78/a_lot_o...
I built the site with Jekyll and run a single EC2 instance and never saw double digit load averages.
I also ran a Facebook advertising campaign for this site[2] which is sitting on S3 with Cloudfront in front. I've load tested that to over 2,000 connections per second, which I expect would exceed the most popular blogs.
If I was worried about bandwidth costs, I would use a $10 Cloudflare plan.
Every one of these "hug of death" discussions ends up tracing back to some bloated Wordpress theme. I continue to be shocked at the way it still occurs.
[0] https://lolware.net/2017/07/04/amp-bloat.html [1] https://lolware.net/2016/11/17/requesting_bank_login.html [2] https://getcryptolocker.com
Anyway I got a glimpse of a pattern in a lot of these sites. So decided to build a tool that would help in these situations with a few tweaks depending on the stack.
That's when I came up with Cachoid[0] as a way to get some provisioning automation.
[0] https://www.cachoid.com
My website runs on WordPress with WP Super Cache, Autoptimize and a few server-side as well as client-side optimizations. Nothing special though but pretty standard measures. Caching is particularly helpful to make sure the database gets hit as little as possible.
The same approach goes for dynamic (database-backed content)--cache the ever-loving shit out of it.