DevOps Zone is brought to you in partnership with:

Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2573 posts at DZone. You can read more from them at their website. View Full User Profile

How to Scale a Web App 1,000x in 3 Days

  • submit to reddit
William Hertling, a Science Fiction writer in his spare time, shared a wild experience on his blog about how in his day job (at HP) he was approached Monday afternoon and told he had to scale a web app up to handle about 10k simultaneous users by Thursday morning.

His stack consisted of NgniX, Rails, and MySQL.  The app is a custom travel guide.

With the gauntlet thrown, Hertling did have some helpful tools and rules in place on his EC2 based app (load balancer, auto-scale rules, they cut page load time by 30 percent last month).  They also just installed JMeter, which was a big help in learning what they still needed.

They toyed with several ideas but ultimately, they decided to take the following action:

    •    We had a few easily identified DB queries that ran with every page request, that loaded the same data each time. We rewrote the code to cache these in memory in global variables that stayed resident between calls. So they would get loaded once when the servers rebooted, and never again.  --William Hertling

Their plan worked and they handled the visitors quite well, but be sure and check out William's blog for the whole story plus some lessons about load testing regularly and having the ability to do safe, expedited, and automated deployments.  He also gave a big shout out to New Relic:

Had we paid for the Pro plan for New Relic earlier, we probably would have saved ourselves a lot of effort, but either way, I do believe New Relic saved our butts  --William Hertling