4 ms·
Surviving the Front Page of HN for Noobs
- benologist 15y agoSurviving 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.
- bjdixon 15y agoI'm sure you're right, but I thought it was a worthwhile lesson on being prepared. It's a quick read and gives actionable advice.
- polyfractal 15y agoI 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.
- hartleybrody 15y agoI'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.
- polyfractal 15y agoI basically followed the Linode Wiki guide to setting up Arch Linux with nginx: http://library.linode.com/web-servers/nginx/php-fastcgi/arch-linux http://library.linode.com/web-servers/nginx/php-fastcgi/arch... I made a few tweaks, but it was pretty vanilla. I also used Amazon's CloudFront to host my gzipped CSS/JS.
- hartleybrody 15y agoOut of curiosity, were you running wordpress? I feel like it's a pretty big memory hog...
- polyfractal 15y agoTo 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.
- hartleybrody 15y agoYah, 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!
- hartleybrody 15y agoYou'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