Is AWS’s Elastic Load Balancer a single point of failure

amazon-elbamazon-web-services

I am looking at moving our application up to Amazon Web Services. The plan is to have all of the EC2 instances mirrored across two availability zones. Due to data transfer costs, we will be staying in a single AWS region (Oregon).

The multiple AZs get rid of the single point of failure for our application and database servers, but what about the ELB? If I have a single ELB distributing traffic across two AZs, is the ELB also hosted across those two AZs?

What does Amazon do to prevent the ELB from being a SPoF?

Best Answer

At its heart, an ELB is just a collection of EC2 instances. When you create an ELB, you specify the availability zones you want that load balancer to be in. Instances to make up the load balancer will then be created in those zones. The way they avoid a single point of failure here is by returning multiple IP addresses when you do a DNS lookup. For example:

  • DNS lookup for website.example.com returns CNAME website-elb-12345.eu-west-1.elb.amazonaws.com
  • The lookup also returns the information for website-elb-12345.eu-west-1.elb.amazonaws.com. It states that the site has IP address 1.2.3.4 and IP address 2.3.4.5

It is up to the client to choose which IP address to use to make a connection. The IP addresses won't always be returned in the same order from the DNS lookup. A client could retry on an alternative IP address if they can't connect on the first attempt.

The TTL on the DNS records for an ELB is only 60 seconds which means that should an ELB instance die and get replaced, the DNS will be updated everywhere fairly quickly.

Related Topic