Re:Surviving the Front Page of HN for Noobs
by benologist on Thursday January 26, 2012 @09:41PM
(#3516972)
Surviving several thousand pageviews compressed into a few hours is really not a feat. Not surviving them is also not newsworthy. Getting on the front page of HN, or before that Reddit, Digg, Slashdot etc, is awesome but in almost no cases does it warrant a "how I did it or how I survived it" post unless there's actually something remarkable about your setup or whatever trick you did to get there.
Re:Surviving the Front Page of HN for Noobs
by polyfractal on Thursday January 26, 2012 @10:32PM
(#3517057)
I don't think a load balancer is really necessary. I weathered being front-paged on HN for several hours just fine using a 512 Linode VPS. It was a pretty stock-vanilla nginx + PHP-FastCGI + mySQL server. Hardly broke a sweat.
I think you should probably look into the configuration of your server, rather than throwing more hardware at the problem.
Re:Surviving the Front Page of HN for Noobs
by hartleybrody on Thursday January 26, 2012 @11:56PM
(#3517201)
I'd love a "how to configure your server to make the front page without breaking a sweat, or throwing hardware at the problem" post. I kinda just followed the default rackspace guidance when I was setting up apache, but I'm sure there's room for improvement there.
Re:Surviving the Front Page of HN for Noobs
by polyfractal on Friday January 27, 2012 @09:45AM
(#3518409)
To be fair, I wasn't running WordPress. My webapp was a lot of client-side javascript and a JSON API backend. So it was probably a lot more lightweight than a big WordPress setup with a lot of plugins.
Did you have something like WPSuperCache installed? That can help a lot by pre-caching all your pages into static html.
Re:Surviving the Front Page of HN for Noobs
by hartleybrody on Friday January 27, 2012 @11:51AM
(#3518935)
Yah, I just installed one. Having spent a little more time looking at the problem since I wrote this post, I think my Achilles heel was memory usage by Wordpress. Once I dial that down I should easily be able to handle another surge without extra hardware. Thanks for the info!
Re:Surviving the Front Page of HN for Noobs
by hartleybrody on Thursday January 26, 2012 @11:54PM
(#3517198)
You're right, it's probably not that newsworthy. I decided to put it together cause:
1. I spent all day dealing with it, so it seemed significant at least to me
2. Most of the sites that make the front page are large hosted sites with a dedicated IT team, so the case of a small site making it seemed like a somewhat interesting hosting challenge
I think you should probably look into the configuration of your server, rather than throwing more hardware at the problem.
I made a few tweaks, but it was pretty vanilla. I also used Amazon's CloudFront to host my gzipped CSS/JS.
Did you have something like WPSuperCache installed? That can help a lot by pre-caching all your pages into static html.
1. I spent all day dealing with it, so it seemed significant at least to me
2. Most of the sites that make the front page are large hosted sites with a dedicated IT team, so the case of a small site making it seemed like a somewhat interesting hosting challenge