DVA-C02 · Question #783
A company has a two-tier application that runs on Amazon EC2 instances behind an Application Load Balancer (ALB). The EC2 instances are in an Auto Scaling group. The Auto Scaling group is configured…
The correct answer is C. Update the Auto Scaling group's health check from Amazon EC2 to Elastic Load Balancing (ELB). With the default Amazon EC2 health checks, the Auto Scaling group only replaces instances when the EC2 instance itself is impaired (for example, hardware or networking failure). If instances are failing ALB target group health checks (causing 502s) but are still “running” from…
Question
A company has a two-tier application that runs on Amazon EC2 instances behind an Application Load Balancer (ALB). The EC2 instances are in an Auto Scaling group. The Auto Scaling group is configured with a lifecycle hook that uses the default health checks for the EC2 instances. During a recent change deployment, the ALB reported HTTP 502 errors. When a developer checked the target group, some of the EC2 instances were marked as unhealthy. However, the Auto Scaling group was not replacing the unhealthy EC2 instances. Which configuration change should the developer make to replace the unhealthy EC2 instances?
Options
- AIncrease the cooldown period of the Auto Scaling group from its default value.
- BUpdate the lifecycle hook to wait for the application to install.
- CUpdate the Auto Scaling group's health check from Amazon EC2 to Elastic Load Balancing (ELB).
- DSet the health check grace period for the Auto Scaling group.
How the community answered
(31 responses)- A10% (3)
- B3% (1)
- C74% (23)
- D13% (4)
Explanation
With the default Amazon EC2 health checks, the Auto Scaling group only replaces instances when the EC2 instance itself is impaired (for example, hardware or networking failure). If instances are failing ALB target group health checks (causing 502s) but are still “running” from EC2’s perspective, Auto Scaling will not replace them. Changing the Auto Scaling group health check type to ELB makes Auto Scaling use the target group health status so it can automatically terminate and replace instances that the ALB marks as unhealthy.
Community Discussion
No community discussion yet for this question.