Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a webapp running in a Media Temple VPS account, and I'm currently evaluating the gains to switch to Amazon EC2. It's running under Apache 2 web server.

This webapp for now has almost no access normally, with some big utilization peaks, which are known with some days of notice.

Right now at Media Temple we have a server with 2GB of Memory, which is enough for those big utilization peaks. As we move to Amazon, I'm thinking maybe of having two instances - a micro for normal use, and a Small or even Medium for the peaks.

I'm trying to figure out the best way to do this in a way this could work. At first, I could maybe change the DNS, routing the clients to the bigger server when those peaks come. But this would be quite dangerous in my opinion, so I'd like to know how this can be done correctly.

Thank you!

share|improve this question
up vote 3 down vote accepted

The canonical way to do this is to have multiple application servers behind a load balancer (which, if you're on AWS, could be their load balancer product, ELB). This way, you can scale the number of app servers up and down on demand. This is generally referred to as horizontal scaling.

Whether or not this will work with your application is something you'll need to figure out. Implementing multiple app servers may require some re-engineering on your part.

If it won't work, then you're typically stuck with vertical scaling(increasing and decreasing resources on a single machine), which is not nearly as easy to scale up and down.

share|improve this answer
Is there any way to test ELB so I know if it works with my application? I think it will work, since everything - even sessions are stored on the database, which is a separate server, and every call is 100% stateless – Waneck Jul 26 '12 at 21:12
Well, it will most certainly be easy to make an a single application server work behind a load balancer. The complexity comes in making sure that multiple application servers work. – EEAA Jul 26 '12 at 21:14
It sounds like your application is a good candidate for working with a load balancer. Just spin up an ELB and a couple app servers and test, it shouldn't cost more than a couple dollars. – EEAA Jul 26 '12 at 21:15
Thank you for your help! – Waneck Jul 26 '12 at 21:33

Amazon provides a couple services that would help you to do this:

You won't have to change DNS, you can just add servers to the pool when you need them and remove them when you're done.

EDIT: just saw the question in comment above: testing in AWS is easy, you can spin up a couple servers and a load balancer in a matter of 10 minutes or so and try it out.

share|improve this answer
Thank you very much for your help! – Waneck Jul 26 '12 at 21:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.