A company hosts a web application on Amazon EC2 instances managed by an Auto Scaling group. The instances are registered as targets under an Application Load Balancer (ALB) that handles SSL termination. Users intermittently report receiving "502 Bad Gateway" errors when accessing the application. A solutions architect discovers that the ALB target group has marked several EC2 instances as unhealthy, but the Auto Scaling group still shows the instances as healthy and continues to route traffic to them. Which configuration change will ensure that the Auto Scaling group automatically terminates and replaces the unhealthy instances?
- Update the Auto Scaling group's health check type configuration from EC2 to ELB.Cevap
- BModify the target group configuration to perform health checks on the default port 80 instead of the application's traffic port.
- CConfigure the private subnet's Network ACL to statefully allow outbound traffic from the ALB's security group to ensure the health checks succeed.
- DImplement an Amazon Route 53 latency routing policy with health checks to route client traffic to a secondary target group in a different Availability Zone.
Cevap
Update the Auto Scaling group's health check type configuration from EC2 to ELB.
The correct answer is to update the Auto Scaling group's health check type configuration from EC2 to ELB. By default, an Auto Scaling group only performs EC2 status checks (system and instance status checks). If the application server fails but the OS remains running, the Auto Scaling group will consider the instance healthy. Setting the health check type to ELB configures the Auto Scaling group to also check the health of the instances in the Application Load Balancer target group, causing it to automatically terminate and replace instances that fail the ALB health check.
Adım Adım Çözüm
Anahtar Kavram
Auto Scaling Group Health Checks (EC2 vs. ELB)
Tahmini Süre:1m 30s