How to Scale a Web App 1,000x in 3 Days
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