Ask HN: How would you handle a large traffic spike (eg. being frontpage on HN)?
11–20 of 32 posts
Re: Ask HN: How would you handle a large traffic spike (eg. being frontpage on HN)?
#12This depends almost entirely on what you're doing. If the site at issue isn't dynamic, my suggested action is probably "do nothing", because being frontpaged by HN is not going to tax any computer routinely used to serve web pages in 2017. If you genuinely have problems, then the question boils down to "What is going to break first?" and whether it makes more sense to harden that or temporarily disable it. If you're…
Putting varnish in front of any web server will help more.
Re: Ask HN: How would you handle a large traffic spike (eg. being frontpage on HN)?
#13This depends almost entirely on what you're doing. If the site at issue isn't dynamic, my suggested action is probably "do nothing", because being frontpaged by HN is not going to tax any computer routinely used to serve web pages in 2017. If you genuinely have problems, then the question boils down to "What is going to break first?" and whether it makes more sense to harden that or temporarily disable it. If you're…
Re: Ask HN: How would you handle a large traffic spike (eg. being frontpage on HN)?
#14This depends almost entirely on what you're doing. If the site at issue isn't dynamic, my suggested action is probably "do nothing", because being frontpaged by HN is not going to tax any computer routinely used to serve web pages in 2017. If you genuinely have problems, then the question boils down to "What is going to break first?" and whether it makes more sense to harden that or temporarily disable it. If you're…
Re: Ask HN: How would you handle a large traffic spike (eg. being frontpage on HN)?
#15Caching. I used to be responsible for sites involved with the Olympics. For 100 weeks traffic was next to nothing. For the two weeks preceding and two weeks during the games there really was spike after spike after spike. The site basically used nginx with SSI to serve up static content that was generated from Rails. Almost everything we could make static was. We rsync'd files every minute or so across the cluster an…
Did you really use Rync? I figured there might be something more modern.
I explored a lot of distributed file systems, was really looking for something that would share files across the cluster once generated by one node. NFS, Ceph, GlusterFS, GridFS, some others.
Re: Ask HN: How would you handle a large traffic spike (eg. being frontpage on HN)?
#16This depends almost entirely on what you're doing. If the site at issue isn't dynamic, my suggested action is probably "do nothing", because being frontpaged by HN is not going to tax any computer routinely used to serve web pages in 2017. If you genuinely have problems, then the question boils down to "What is going to break first?" and whether it makes more sense to harden that or temporarily disable it. If you're…
Switching from mod_php to php-fpm + proxy-fcgi (ie still with Apache) and then using the event mpm will help a lot. Putting varnish in front of any web server will help more.
This has been my goto implementation because it can be rapidly deployed. Shameful plug: I've built Cachoid [0] for this very reason. It's a Varnish as a service platform and you can get up and running within 10 seconds.
Re: Ask HN: How would you handle a large traffic spike (eg. being frontpage on HN)?
#17Re: Ask HN: How would you handle a large traffic spike (eg. being frontpage on HN)?
#18This depends almost entirely on what you're doing. If the site at issue isn't dynamic, my suggested action is probably "do nothing", because being frontpaged by HN is not going to tax any computer routinely used to serve web pages in 2017. If you genuinely have problems, then the question boils down to "What is going to break first?" and whether it makes more sense to harden that or temporarily disable it. If you're…
Absolutely nothing. I've had my personal site reach the top a couple of times and its been totally fine each time. My site is static and runs on a $5 Digital Ocean droplet. The traffic barely even made it blink.
Re: Ask HN: How would you handle a large traffic spike (eg. being frontpage on HN)?
#19It got to be 3rd at the most, if I remember correctly.
I got 300 people at the same time for about 10 hours, then high but not crazy traffic for 2-3 days after that.
300 people at the same time is not a lot.
I had a WordPress website with no cache on a dedicated VPS (but nothing crazy), and neither the CPU nor memory got that busy. 300 people are about 1 person/second, 2 max. That's not a lot of load for a server.