Soru

Zorluk: OrtaAuto Scaling and Elastic Load Balancing (ELB)

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?

  1. Update the Auto Scaling group's health check type configuration from EC2 to ELB.Cevap
  2. B
    Modify the target group configuration to perform health checks on the default port 80 instead of the application's traffic port.
  3. C
    Configure the private subnet's Network ACL to statefully allow outbound traffic from the ALB's security group to ensure the health checks succeed.
  4. D
    Implement 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

1
Analyze the mismatch between the load balancer target group health status and the Auto Scaling group health status.
By default, an Auto Scaling group only monitors EC2 status checks (the health check type is set to EC2). It does not monitor the health of the application running behind the Application Load Balancer.
This explains why the Auto Scaling group considers the instances healthy even though the ALB target group has marked them as unhealthy due to application-level failures.
2
Identify the correct configuration update to bind the Auto Scaling group health checks to the load balancer target group health checks.
Changing the Auto Scaling group health check type to ELB ensures the Auto Scaling group monitors the target group's health checks.
This configuration allows the Auto Scaling group to detect when an instance fails the target group's application-level health check, prompting it to replace the instance.

Anahtar Kavram

Auto Scaling Group Health Checks (EC2 vs. ELB)
Tahmini Süre:1m 30s
Bu soruyu puanla