{"id":65,"date":"2015-10-30T15:38:26","date_gmt":"2015-10-30T19:38:26","guid":{"rendered":"http:\/\/blog.law.cornell.edu\/tech\/?p=65"},"modified":"2015-10-30T16:13:37","modified_gmt":"2015-10-30T20:13:37","slug":"a-day-in-the-life-traffic-spike","status":"publish","type":"post","link":"https:\/\/blog.law.cornell.edu\/tech\/2015\/10\/30\/a-day-in-the-life-traffic-spike\/","title":{"rendered":"A day in the life: Traffic spike"},"content":{"rendered":"
You were expecting only a couple of people. \u00a0And you have a couple bags of chips, some beer and a few soft drinks; that should be plenty. \u00a0Somewhere in the back there\u2019s probably some pretzels and seltzer if things get low. \u00a0But then the door opens and people keep pouring in. \u00a0The living room fills, the kitchen, even the bedroom. \u00a0You squeeze through and look out the window, and the entire street is mobbed with people coming over. \u00a0No doubt about it: your supplies have crashed.<\/span><\/p>\n We know how you feel.<\/span><\/p>\n As our regular readers know, we\u2019ve been working on building up the eCFR, so our systems mastermind, Nic, has been keeping a close eye on our load numbers. \u00a0But because we\u2019re building things \u2014 hammers everywhere, and piles of plywood, and mind the cord please \u2014 when our numbers started to spike one evening a few weeks ago, Nic figured that it was some extra overhead from the feature deployment that was running. \u00a0Whatever it was, it was heavy: Nic said it was the only time he\u2019d seen Nginx, the web server, run out of available worker processes.<\/span><\/p>\n But it wasn\u2019t our the deployment. \u00a0Nic looked more closely at the server logs, and it was just an enormous spike in traffic. \u00a0Not enough to actually crash the site, but enough that not everyone was able to get the information they were looking for. \u00a0Nic kept digging. \u00a0It was puzzling: the huge wave of hits came at a very specific time \u2014 between 9:20 and 9:40 at night. \u00a0They were all from different locations, so it wasn\u2019t a crawler run amok. \u00a0What was everyone looking for? \u00a0Did someone think we had early Star Wars tickets or something?<\/span><\/p>\n Well, the clue was in the specific information people were looking for. \u00a0Everyone, it seemed, was suddenly interested in the 14th amendment. Cross checking that against a news twitter stream, and there was the answer. \u00a0As it turns out the Republican Presidential debate was that night. \u00a0At some point shortly after 9:20, someone mentioned the 14th amendment. \u00a0And the next thing you know, we\u2019re out of chips and pretzels.<\/span><\/p>\n But of course we at the LII, being hospitable folk, don\u2019t like to run out of munchies. \u00a0So we\u2019ve got a plan to make sure it doesn\u2019t happen again. \u00a0Nic is gearing up to implement demand-driven autoscaling. \u00a0This will set up an automated monitor which keeps track of our load numbers, and then, if it detects a spike, adds a new machine and balances the workload between them. \u00a0Once the traffic slows down, the extra machine can quietly switch back off.<\/span><\/p>\n So next time the house fills up, we hope to have an extra tent ready to pitch itself automatically, and a whole tub of munchies in the garage. \u00a0Because rest assured, we\u2019re here to welcome you, and no one likes a party without something to snack on. <\/span><\/p>\n","protected":false},"excerpt":{"rendered":" You were expecting only a couple of people. \u00a0And you have a couple bags of chips, some beer and a few soft drinks; that should be plenty. \u00a0Somewhere in the back there\u2019s probably some pretzels and seltzer if things get low. \u00a0But then the door opens and people keep pouring in. \u00a0The living room fills, […]<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7430],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.law.cornell.edu\/tech\/wp-json\/wp\/v2\/posts\/65"}],"collection":[{"href":"https:\/\/blog.law.cornell.edu\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.law.cornell.edu\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.law.cornell.edu\/tech\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.law.cornell.edu\/tech\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":1,"href":"https:\/\/blog.law.cornell.edu\/tech\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":66,"href":"https:\/\/blog.law.cornell.edu\/tech\/wp-json\/wp\/v2\/posts\/65\/revisions\/66"}],"wp:attachment":[{"href":"https:\/\/blog.law.cornell.edu\/tech\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.law.cornell.edu\/tech\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.law.cornell.edu\/tech\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}