Elastic Load Balancing in Multiple Zones

Ran into a problem this morning with Amazon’s Elastic Load Balancer. If you want to have multiple availability zones, say us-east-1a and us-east-1b, behind your elastic load balancer, be sure to have at least one healthy instance running in each. What happens otherwise is inbound requests will “dead end” and serve up 503 errors. This is because the DNS actually resolves to each zone regardless of the health checks and before passing requests to the actual load balancer for that zone. In otherwords, the zones are unaware of the status of the machines in different zones. 🙁

From Paul@AWS on the Amazon Discussion Forum:

The output from your describe call shows that you have two zones enabled:


but you only have instances behind one of them. Whenever your client happens to get directed to the empty zone (which happens at DNS resolution time), it will have a dead-end.

The solution is to either add instances in the additional zone or disable that extra zone.

You can read the full thread that tipped me off this morning to the issue I was experiencing.

This entry was posted in Amazon Web Services, Web Hosting and tagged , , . Bookmark the permalink.

2 Responses to Elastic Load Balancing in Multiple Zones

  1. Shlomo says:


    Thanks for the gotcha.

    This actually makes sense, given the apparent design of ELB. It appears to serve up multiple IP addresses in response to the DNS lookup, each of which is a load-balancer. Each load-balancer seems to serve only one availability-zone.

    More info on the design of ELB, pieced together from the forums and from observing its behavior, in my article:

  2. Shlomo says:

    Forgot to say: this is actually documented:


    “It is important to register instances in the new Availability Zone with your LoadBalancer before adding the Availability Zone. When you call EnableAvailabilityZonesForLoadBalancer, the LoadBalancer begins to route traffic equally amongst all the enabled Availability Zones. If the instances have not been registered, requests going to the new Availability Zone will fail.”