{"id":26,"date":"2012-09-05T06:08:00","date_gmt":"2012-09-05T06:08:00","guid":{"rendered":"http:\/\/blog.maclawran.ca\/udid-it-350k-hits-on-a-little-server-in-less"},"modified":"2012-09-05T06:08:00","modified_gmt":"2012-09-05T06:08:00","slug":"udid-it-350k-hits-on-a-little-server-in-less","status":"publish","type":"post","link":"https:\/\/blog.maclawran.ca\/?p=26","title":{"rendered":"Udid it&#8230; 350K hits on a little server in less than 24h"},"content":{"rendered":"<p>I work at night.&nbsp; Late.&nbsp; Lately, all night.&nbsp; More or less&#8230; hacking away in the complete peace and quiet.&nbsp; And I periodically check <a href=\"http:\/\/ycombinator.com\">Hacker News<\/a> &#8211; and sometimes, like yesterday morning I submit something.&nbsp; <a href=\"http:\/\/pastebin.com\/nfVT7b0Z\">#antisec had gotten ahold of 12 million iphone UDID&#8217;s and released a million of them out into the wild<\/a>. I immediately followed their excellent instructions on checking and downloading the archive and checked to see if my UDID was in there.&nbsp; It wasn&#8217;t.<\/p>\n<p><a href=\"http:\/\/pastebin.com\/nfVT7b0Z\"><\/p>\n<div class='p_embed p_image_embed'><img loading=\"lazy\" decoding=\"async\" alt=\"6\" height=\"80\" src=\"http:\/\/blog.maclawran.ca\/wp-content\/uploads\/2013\/05\/7e63c-6-scaled500.jpg\" width=\"80\" \/><\/div>\n<p><\/a>It then struck me that others might want to do the same thing&#8230; so I put up <a href=\"http:\/\/kimosabe.net\/test.html\">a truly crappy page<\/a> along with <a href=\"http:\/\/kimosabe.net\/test-php.txt\">a 12 line php script<\/a>, threw it up on a currently unused domain (kimosabe.net) and submitted it to Hacker News as a quick check.<\/p>\n<p>I had spent a long time trying to work out a sensible and efficient architecture for use on cheap VPS boxes.&nbsp; Xen for virtualization &#8211; because you&#8217;re guaranteed an amount of memory and it&#8217;s tough for VPS providers to oversell Xen boxes, <a href=\"http:\/\/www.ubuntu.com\">Ubuntu<\/a> which I love &#8211; Natty Narwhal,&nbsp; and I ended up using <a href=\"http:\/\/www.lighttpd.net\/\">Lighttpd<\/a> for the web server.&nbsp; It supposed to be light and efficient, and it is.<\/p>\n<p>The second important decision was using&nbsp; <a href=\"http:\/\/http:\/\/php-fpm.org\/\">php5-fpm<\/a> &#8211; what I really like is that each virtual host can run as its  own userID &#8211; so if anything bad happened, it would limit the damage, not to mention the speed.<\/p>\n<p>The hits started coming immediately&#8230; uh oh.&nbsp; First thing to do &#8211;  backup everything just in case the server blows up&#8230; done.&nbsp; Then I  watched as my entry hit the top of Hacker News, hit Slashdot, NBC news,  FOX news, Le Figaro&#8230; holy crap.<\/p>\n<p>Then it happened.<\/p>\n<p>Nothing.&nbsp; The server didn&#8217;t break a sweat.&nbsp; The load average may have  gone over 1 once&#8230; as of now, over 350K hits on a server I pay $15 a  month for from <a href=\"http:\/\/empire-hosting.net\/unmanaged-xen-vps.html\">Empire Hosting<\/a>.<\/p>\n<p>I think the combination of Lighttpd+php5-fpm is underappreciated&#8230;<\/p>\n<p>Of course the question of what to do with all this traffic?&nbsp; Leverage it!&nbsp; Nope.&nbsp; That&#8217;s not the point.&nbsp; I had to put a link to some of my details up when someone (wisely) thought that this might just be a UDID sucker&#8230; 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&#8230; so I added a link&#8230; interesting side effect, 1% of the incoming traffic did visit <a href=\"http:\/\/jessi.ca\">Bunny Island<\/a>&#8230;<\/p>\n<p>The lesson is really simple.&nbsp; Make it work, put it out.&nbsp; You can make it pretty later, maybe.<\/p>\n<p>That was a trip&#8230; thanks HackerNews.<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">I work at night. Late. Lately, all night. More or less&#8230; hacking away in the complete peace and quiet. And I periodically check Hacker News &#8211; and sometimes, like yesterday morning I submit something. #antisec had gotten ahold of 12 million iphone&#8230;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/blog.maclawran.ca\/?p=26\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[4,6,10,11,14,19,23,31],"class_list":["post-26","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-antisec","tag-bunnyisland","tag-hackernews","tag-hn","tag-lighttpd","tag-massiveload","tag-php5fpm","tag-udid"],"_links":{"self":[{"href":"https:\/\/blog.maclawran.ca\/index.php?rest_route=\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.maclawran.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.maclawran.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.maclawran.ca\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.maclawran.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26"}],"version-history":[{"count":0,"href":"https:\/\/blog.maclawran.ca\/index.php?rest_route=\/wp\/v2\/posts\/26\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.maclawran.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.maclawran.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.maclawran.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}