{"id":1006,"date":"2009-08-24T19:10:01","date_gmt":"2009-08-24T23:10:01","guid":{"rendered":"http:\/\/www.matthewgkeller.com\/blog\/?p=1006"},"modified":"2011-10-14T09:20:09","modified_gmt":"2011-10-14T13:20:09","slug":"build-a-moat","status":"publish","type":"post","link":"http:\/\/www.matthewgkeller.com\/blog\/2009\/08\/24\/build-a-moat\/","title":{"rendered":"Build A Moat"},"content":{"rendered":"<p>Your app is falling down because it&#8217;s been Slashdotted. Your database can&#8217;t handle the query surge. Your app is highly dynamic so tossing up a static front-page, using Akamai, etc. isn&#8217;t viable. How can you handle 30kviews\/s?<\/p>\n<p>You have a moat. <a href=\"http:\/\/www.squid-cache.org\/\">Squid<\/a> or <a href=\"http:\/\/httpd.apache.org\/\">Apache<\/a> with <a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/mod\/mod_cache.html\">mod_cache<\/a> can be configured with very short cache-durations (Expire or CacheDefaultExpire, respectively): I like 3 or 5 seconds.<\/p>\n<p>It&#8217;s not so hard to handle 30kviews\/s when 29,999 of them are from cache, yet for 99.9% of your users, they&#8217;ll see no human-discernible difference between the 1st request, and the 30,000th.<\/p>\n<p>Bring the fire. We have a moat.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Your app is falling down because it&#8217;s been Slashdotted. Your database can&#8217;t handle the query surge. Your app is highly dynamic so tossing up a static front-page, using Akamai, etc. isn&#8217;t viable. How can you handle 30kviews\/s? You have a &hellip; <a href=\"http:\/\/www.matthewgkeller.com\/blog\/2009\/08\/24\/build-a-moat\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,10,17],"tags":[],"class_list":["post-1006","post","type-post","status-publish","format-standard","hentry","category-architecture","category-linuxy","category-work"],"_links":{"self":[{"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/posts\/1006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/comments?post=1006"}],"version-history":[{"count":0,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/posts\/1006\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/media?parent=1006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/categories?post=1006"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/tags?post=1006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}