Over a million developers have joined DZone.

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

· DevOps Zone

Discover how to optimize your DevOps workflows with our cloud-based automated testing infrastructure, brought to you in partnership with Sauce Labs

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

Source: http://www.williamhertling.com/2012/02/scaling-web-app-1000x-in-3-days.html

Download “The DevOps Journey - From Waterfall to Continuous Delivery” to learn learn about the importance of integrating automated testing into the DevOps workflow, brought to you in partnership with Sauce Labs.


Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}