The issue I'm having is I want to upgrade that instance often(security patches, etc) but I'm affriad something will fail and the site will be down. So, I want to have another server setup and load balance between the two that way I can easily disable one, upgrade it and once it's working add it back in the mix and repeat. What kind of machine is needed for a load balancer? Would the micro instance work just fine? The site gets anywhere from 3-10k hits/day.

I plan on using nginx as the load balancer.


Any reason to not use Amazon's Elastic Load Balancer?

From what you described, it would do exactly what you needed and require no more setup than a couple clicks in the AWS Management Console.


As long as you're not going to need to do much caching on the load balancer, this should be fine. You'll also (probably) want to make sure that the load balancer and its back-end nodes are provisioned in the same availability zone otherwise performance could become an issue.



Which router? Every box is multiple hops from every other box so you can't Direct Route. You can't set the backend boxes to route through the director so no "masq" and you can't use IPIP on ec2. I don't see a solution for this. Am I missing something?


I haven't tried this out yet but I was planning on using LVS within a Virtual Private Cloud. You can create a private subnet with this Amazon feature and put all your virtual machines on the same subnet. I'm not sure if LVS DR would work (Amazon might not like the real servers spoofing back to the client with the IP of load balancer) but LVS NAT (masq) has a good chance of working.

My biggest concern is there will be added latency because the Virtual private cloud subnet might add even more hops than normal. This would be avoided with Nginx.

I did successfully setup LVS NAT (masq) in conjunction with openVPN to create the appearance of a private single subnet network but it didn't perform well.

If you manage to give this a shot before I do, I would love to hear your outcome.


I have a suggestion instead of using nginx on the micro instance use LVS as a load balancer. LVS is even lighter than nginx because it works at Layer 4 and can easyly handle 10k requests a day.

  • 10k requests a day? That's only one every eight seconds (86400 seconds in a day). You're missing a couple zeros. – ceejayoz Apr 10 '11 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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