Dynamically Scale Web Applications in Amazon EC2
Ever since I started working on the Amazon cloud, I was stuck with one thing - not being able to scale the web applications dynamically. To be honest it didn’t even strike me until companies like Rightscale and Scalr started to come into the limelight. Until that time I was just trying to imitate the existing environment, just migrating to Amazon cloud. When I saw the demo of Rightscale and Scalr, I thought it was amazing, to be able to scale the applications dynamically with the click of a button. They have done a wonderful job of automating a whole lot of stuff without getting into the boxes and just using their web based administration application. So I thought what would it take to do a step 1 of what they do - automatically scale up or scale down an instance. I used simple shell scripts to make that happen. I created a white paper that explains the approach and what the scripts do. The white paper assumes Nginx is used for load balancing a web application and Nagios for monitoring the instances. The solution involves dynamically adding a new instance to the Nginx configuration for load balancing and adding the Nagios configuration for monitoring the new instance. It also removes the configurations from Nginx and Nagios when the instance is brought down.
Click the button below to download the zip file containing the white paper and the shell scripts.
| Download Dynamically Scaling Web Applications in EC2.zip |
This is just a first step to scaling the applications dynamically. It would still require someone to decide when the application needs to be scaled up or scaled down. But once that decision is made it is just a matter of bringing up or down the instances and the rest of the stuff is taken care of.
Feel free to pass on your comments and feedback.
Deprecated: Function ereg_replace() is deprecated in /home/techmasa/public_html/wp-content/plugins/sociable/sociable.php on line 64
Permalink
Cosmos










BotchagalupeMarks for April 6th - 05:20 | IT Management and Cloud Blog Said,
April 7, 2009 @ 10:37 am
[…] TechMasala - Technology Spice Rack » Dynamically Scale Web Applications in Amazon EC2 - The white paper assumes Nginx is used for load balancing a web application and Nagios for monitoring the instances. The solution involves dynamically adding a new instance to the Nginx configuration for load balancing and adding the Nagios configuration for monitoring the new instance. It also removes the configurations from Nginx and Nagios when the instance is brought down. […]
Mikayel Said,
May 13, 2009 @ 12:30 am
Ramesh you did great thing, but instead of Nagios it is more easy to use http://www.monitis.com service, which allows in a couple of minutes to setup monitoring for your instances
Elastic Load Balancing, Auto Scaling, and CloudWatch Resources « LocalLab : Foire aux Infos Said,
July 16, 2009 @ 8:12 pm
[…] Author and blogger Ramesh Rajamani wrote a detailed paper on the topic of Dynamically Scaling Web Applications in Amazon EC2. Although the paper predates the release of the Elastic Load Balancer and Auto Scaling, the approach to scaling is still valid. Ramesh shows how to use Nginx and Nagios to build a scalable cluster. […]