Over a million developers have joined DZone.

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

DZone's Guide to

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

· DevOps Zone ·
Free Resource

Get the fastest log management and analysis with Graylog open source or enterprise edition free up to 5GB per day

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

Get the fastest log management and analysis with Graylog open source or enterprise edition free up to 5GB per day


Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}