Ask HN: How do you survive a HN launch?

3 points by martin-adams ↗ HN
Every so often a site hits the homepage and gets taken offline. Anyone got tips on how to test a site for load before it goes viral?

7 comments

[ 3.3 ms ] story [ 34.4 ms ] thread
Using AWS or similar, you can upgrade to a huge server for just a few hours, then downgrade it once the traffic tapers.
What would a micro instance do if the load increases to that degree? Does it actually crash or try to do some scaling? I'm a bit green to aws.
It does not do automatic scaling, but, if you're expecting a one time spike you can just go with a huge server for that hour.
It might shut itself down due to too much load. In my experience, I find you can surpass the maximum load by 2 or even 3 times with no problem. But any more than that, and it will just shut down.
Fortunately for me I'm already using AWS. The trick is getting an understanding of the load limitations of the instance types and where the application will keel over and die.
Take a look at apache benchmark ( http://httpd.apache.org/docs/2.2/programs/ab.html ) which can help get a general idea of what your server can take.

Generally speaking, for blog-type content that's typically served to HN, it's best to ensure that each visit doesn't equate to a db query (either via a caching mechanism, or by using a blogging platform that's not db based)..

Great thanks. It'll be interesting to know what load my application will fall over with.