About recovery operation when AZ failure occurs

0

When a website system is configured by combining a multi-AZ configuration and an ALB When an AZ failure occurs, I think the EC2 on the failure side will be separated, but please tell me what will happen when the AZ failure is recovered.Automatic If there is a document page that can be used as a reference, such as whether the connection will be restored on a regular basis, please share that as well.

asked 2 years ago313 views
1 Answer
1

Hi,

When there is an AZ failure, the health checks on the ALB would fail on the basis of unhealthy threshold and stop sending traffic to the instance in failed AZ. The health checks continue in the background and when the AZ recovers the instance is marked healthy after meeting the success threshold. For the duration that the EC2 remains unhealthy due to the supposed AZ failure, the ASG health checks define what happens to the unhealthy instance (if the instances were part of the ASG & ideally should be for multi AZ config). The default is EC2 health checks in ASG, which means that the instance would be replaced only if the instance has a hardware failure and is impaired. You can also set it to ELB health check type in ASG, where the instance would be auto replaced due to being marked unhealthy by the ALB and to maintain the desired count

If you manually added the instances in different AZ to the ALB ( ie. no ASG), then the instance would only be marked unhealthy and not receive traffic for the duration of the AZ failure but wont be terminated. Once the AZ recovers, the instance would start receiving traffic.

Some useful links:

https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-health-checks.html https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-add-elb-healthcheck.html

--Syd

profile picture
Syd
answered 2 years ago
profile pictureAWS
EXPERT
Chris_G
reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions