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've a Amazon ELB behind which there are 3 EC2 instances distributed across 3 zones.

Following are extracts of access logs on each instances:

1st instance(Zone A): - - [17/Sep/2011:15:40:16 -0400] "GET /healthcheck.html HTTP/1.1" 200 194 "-" "ELB-HealthChecker/1.0" - - [17/Sep/2011:15:40:16 -0400] "GET /healthcheck.html HTTP/1.1" 200 194 "-" "ELB-HealthChecker/1.0" - - [17/Sep/2011:15:40:17 -0400] "GET /healthcheck.html HTTP/1.1" 200 194 "-" "ELB-HealthChecker/1.0" - - [17/Sep/2011:15:40:17 -0400] "GET /healthcheck.html HTTP/1.1" 200 194 "-" "ELB-HealthChecker/1.0"

2nd instance(Zone C): - - [17/Sep/2011:15:40:16 -0400] "GET /healthcheck.html HTTP/1.1" 200 194 "-" "ELB-HealthChecker/1.0" - - [17/Sep/2011:15:40:16 -0400] "GET /healthcheck.html HTTP/1.1" 200 194 "-" "ELB-HealthChecker/1.0"

3rd instance(Zone D): - - [17/Sep/2011:15:40:16 -0400] "GET /healthcheck.html HTTP/1.1" 200 194 "-" "ELB-HealthChecker/1.0" - - [17/Sep/2011:15:40:16 -0400] "GET /healthcheck.html HTTP/1.1" 200 194 "-" "ELB-HealthChecker/1.0"

Eager to know how come traffic is coming from separate IP's on instances behind same ELB. Also, is showing up on two of instances. Why is that so?

Do LB's exist in each zone where an instance is launched? Sounds weird, but having separate IP's in access logs make me believe it..

share|improve this question
up vote 2 down vote accepted

ELBs appear to work in a way that is somewhat counter-intuitive (at least at first glance), in order to maintain scalability and prevent a single point of failure.

I think that the first impression one gets of an ELB is that it is a single regular instance setup with some load balancing software that sits in front of your application instances and distributes the traffic - my recent reading suggests that this is quite far from reality.

It appears that each availability zone has one (or more) load balancers to serve your instances in that zone. You will have setup a CNAME to point to the ELB - a virtual entity - AWS' internal DNS will map this to one of the load balancers assigned to you. That load balancer will then determine where to send the client request - whether it is to an instance in the same availability zone or to another availability zone. Additionally, more load balancers will be added in order to scale your applications needs, and AWS does this in 'anticipation' of increased traffic.

Therefore, it is hypothetically possible to have 2 or more load balancers per availability zone despite only having launched a single ELB, if their is sufficient traffic going to your application.

If you glance at the ELB Developer Guide (around page 9) you will find a mention of the idea that a request can be passed from one load balancer to another. (In the particular example given, it refers to multiple X-Forwarded-For headers, including those of ELBs).

If you have back-end application instances in multiple Availability Zones, the X-Forwarded-For request header can contain one or more load balancer IP addresses. Because Elastic Load Balancing uses a different load balancer for each Availability Zone, a client request can be passed from one load balancer to another before reaching a back-end application instance. For example, if you have back-end instances in Availability Zones US-east-1a and US-east-1b, a client request might be handled initially by the load balancer in US-east-1a. If Elastic Load Balancing determines that this request should be routed to US-east-1b, the load balancer in US-east-1a routes the request to the load balancer in US-east-1b.

Hopefully that addresses how you have multiple load balancer addresses as well as how the same address may show up in different availability zones.

I would suggest looking at The “Elastic” in “Elastic Load Balancing”: ELB Elasticity and How to Test it as a good overview of how ELBs work.

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.