Your cart is currently empty!
First Experience Scaling Web Apps on EC2
Last week I had a bit of a crisis situation with my apps. After several mornings of waking up to find the server not responsive and 700+ emails waiting in my inbox something had to be done.
When starting out I leaned towards keeping the costs as low as possible. That meant putting several virtual hosts (apache) and MySQL on the same server. But as the traffic for the site grew I started getting more and more crash situations. It took a while to diagnose but evenutally I figured out that HTTP requests would come in and eventually use up all the memory on the server at which point MySQL would crash and restart. In the time it took MySQL to restart I would end up with several hundred error emails from failed requests. Fun.
After some struggling I decided to launch another instance to host my most taxing web application. Thus isolating the memory requirements of apache from MySQL.
Setting the new server up behind a load balancer will make future scaling much easier.
Doing something similar without the flexibility of Amazon’s AWS would have been a much bigger nightmare.
Luckily now that the apps are making decent money paying for the extra server usage is easy to justify.
by
Tags: