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 an application on EC2 that now needs to have it's backend load balanced. I'm trying to maintain my backend servers such that they are not publicly visible.

Is there anyway to use the Elastic Load Balancer to manage my backend servers?
I know that I can manage EC2 instances such that they only get traffic from an ELB, but how to I ensure that only my front end servers are the ones that are able to call the ELB in the first place? (e.g. I want to ensure that nobody's web browser can hit the ELB and thus get access to my backend servers)

To be clear: I don't currently have 2 ELB instances -- what I have is several front end web servers that currently connect to 1 backend machine that does some processing. I need to create another backend server to handle increased load on my backend machine and am trying to figure out the best way to scale so that >10 web servers can balance across the now 2 backend servers.

If ELB cannot do this, what is is the recommended solution?

share|improve this question

I think you may be confused. Your front-end servers should be the ELB. The general flow of application traffic would be:

                             |-> EC2 Instance 1
Client -> Internet -> ELB -> |-> EC2 Instance 2
                             |-> EC2 Instance 3

So yes, you can certainly configure things such that internet clients have no visibility to what your back-end infrastructure looks like.

share|improve this answer
I have Client -> Internet -> Elb front end -> elb backend I want to load balance the backend servers – hortitude Jul 17 '11 at 22:23
So you have two levels of ELB instances? That seems very sub-optimal. What are your reasons for doing this? I've never heard of anyone using two levels of load balancers. – EEAA Jul 17 '11 at 22:25
updated the question with information to answer your comment – hortitude Jul 18 '11 at 3:47

I'm not particularly familiar with ELB, so I can't really comment on that, but I've found for internal load-balancing haproxy is the best bet. I'm a fan of L3 solutions like LVS for front-end load-balancing, but internally the network routing issues get complex, and you usually don't care about the sorts of problems that a proxy introduces, so unless ELB can clearly do what you need, I'd go with haproxy.

share|improve this answer

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.