Bitzu

SAA-C03 ยท High availability and disaster recovery

Multi-AZ load balancing with Auto Scaling

Removing single points of failure with a load balancer and an Auto Scaling group spread across Availability Zones, health checks and self-healing instances.

Key points

  • One EC2 instance, or several in one AZ, is a single point of failure.
  • Fix: load balancer (usually ALB) in 2+ AZs before an Auto Scaling group in the same AZs.
  • Traffic goes only to targets passing health checks.
  • The group keeps desired capacity: unhealthy instances are replaced from the launch template.
  • EC2 status checks always apply; ELB health checks must be turned on.
  • Health check grace period: boot time for new instances.

Source: https://docs.aws.amazon.com/autoscaling/ec2/userguide/health-checks-overview.html

Practice questions

Single choice

Which component distributes incoming requests across healthy EC2 instances running in several Availability Zones?

  1. An Auto Scaling group
  2. An Application Load Balancer
  3. A NAT gateway
  4. An Elastic IP address
Show answer

Answer: B. An Application Load Balancer

An Elastic Load Balancing load balancer, such as an Application Load Balancer, spreads traffic across registered targets in the AZs where it is enabled and skips unhealthy ones. An Auto Scaling group adds and replaces instances but does not route requests; a NAT gateway handles outbound traffic; an Elastic IP is a single static address.

Select all that apply

A web tier currently runs on one large EC2 instance. Which changes remove it as a single point of failure?

  1. Run the instances in an Auto Scaling group with subnets in two or more AZs
  2. Put an Application Load Balancer enabled in those same AZs in front
  3. Move to a larger instance type with more vCPUs and memory
  4. Attach an Elastic IP address so the public address never changes
  5. Place all instances in one cluster placement group for fast networking
Show answer

Answer: A. Run the instances in an Auto Scaling group with subnets in two or more AZs, B. Put an Application Load Balancer enabled in those same AZs in front

Spreading the Auto Scaling group across subnets in at least two AZs and enabling the load balancer in those AZs lets the tier survive the loss of an instance or a whole AZ. A bigger instance, an Elastic IP or a cluster placement group all keep the workload on a single instance or a single AZ.

True or false

Once a load balancer is attached, an Auto Scaling group automatically replaces instances that the load balancer reports as unhealthy, with no other setting needed.

Show answer

Answer: False

False. By default EC2 Auto Scaling ignores Elastic Load Balancing health check results and relies on EC2 status checks. You must turn on ELB health checks for the group before load balancer failures lead to replacement.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More SAA-C03 topics in this module