I work at night. Late. Lately, all night. More or less… hacking away in the complete peace and quiet. And I periodically check Hacker News – and sometimes, like yesterday morning I submit something. #antisec had gotten ahold of 12 million iphone UDID’s and released a million of them out into the wild. I immediately followed their excellent instructions on checking and downloading the archive and checked to see if my UDID was in there. It wasn’t.
It then struck me that others might want to do the same thing… so I put up a truly crappy page along with a 12 line php script, threw it up on a currently unused domain (kimosabe.net) and submitted it to Hacker News as a quick check.
I had spent a long time trying to work out a sensible and efficient architecture for use on cheap VPS boxes. Xen for virtualization – because you’re guaranteed an amount of memory and it’s tough for VPS providers to oversell Xen boxes, Ubuntu which I love – Natty Narwhal, and I ended up using Lighttpd for the web server. It supposed to be light and efficient, and it is.
The second important decision was using php5-fpm – what I really like is that each virtual host can run as its own userID – so if anything bad happened, it would limit the damage, not to mention the speed.
The hits started coming immediately… uh oh. First thing to do – backup everything just in case the server blows up… done. Then I watched as my entry hit the top of Hacker News, hit Slashdot, NBC news, FOX news, Le Figaro… holy crap.
Then it happened.
Nothing. The server didn’t break a sweat. The load average may have gone over 1 once… as of now, over 350K hits on a server I pay $15 a month for from Empire Hosting.
I think the combination of Lighttpd+php5-fpm is underappreciated…
Of course the question of what to do with all this traffic? Leverage it! Nope. That’s not the point. I had to put a link to some of my details up when someone (wisely) thought that this might just be a UDID sucker… other than that, my wife is a writer of literary crime fiction and she was jealous^H^H^H^H^H^H^H upset that her blog got so few hits… so I added a link… interesting side effect, 1% of the incoming traffic did visit Bunny Island…
The lesson is really simple. Make it work, put it out. You can make it pretty later, maybe.
That was a trip… thanks HackerNews.