Soru

Zorluk: ZorAuto Scaling and Elastic Load Balancing (ELB)

An analytics company hosts a distributed data ingestion service on Amazon EC2 instances inside an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The ingestion service processes incoming data on port 5001, while a separate health status daemon runs on port 9001. The ASG is currently configured with the default EC2 health check type. During a recent event, the ingestion service crashed on several instances, but the ASG did not terminate them, resulting in lost data. To resolve this, a solutions architect updated the configuration, but the ASG began aggressively terminating newly launched instances before they could complete their 10-minute cache warming process.

Which two actions should the solutions architect take to resolve these issues? (Select two.)

  1. Change the Auto Scaling group health check type from EC2 to ELB.Cevap
  2. Increase the Auto Scaling group health check grace period to at least 600 seconds.Cevap
  3. C
    Configure the Application Load Balancer target group health check to use the traffic port.
  4. D
    Add an inbound rule to the EC2 instance security groups allowing traffic on all ephemeral ports from the Application Load Balancer.
  5. E
    Configure an Amazon Route 53 latency routing policy to route traffic directly to the EC2 instances, bypassing the Application Load Balancer.

Cevap

Change the Auto Scaling group health check type from EC2 to ELB, and increase the Auto Scaling group health check grace period to at least 600 seconds.
Changing the Auto Scaling group health check type from EC2 to ELB ensures that the ASG monitors application-level availability via the Application Load Balancer target group. In addition, increasing the health check grace period to at least 600 seconds prevents the ASG from prematurely terminating new instances while they are performing their 10-minute cache warming process.

Adım Adım Çözüm

1
Analyze why crashed instances are not being replaced.
The Auto Scaling group is configured with the EC2 health check type, which only monitors hypervisor-level instance status. If the application service crashes but the OS remains healthy, the instance is marked healthy.
To ensure instances with crashed application services are replaced, we must link the ASG to the Application Load Balancer's target group health checks by changing the health check type to ELB.
2
Analyze why new instances are being terminated immediately after launching.
When the health check type is changed to ELB, the ASG begins monitoring the ALB's health checks immediately or after the grace period. Because the cache warming process takes 10 minutes (600 seconds) to complete, the instance fails health checks initially and is terminated prematurely by the ASG.
Increasing the health check grace period to at least 600 seconds prevents the ASG from evaluating the health status of new instances until they have completed initialization.
3
Ensure the target group health check port is correctly configured.
The target group health checks must query the health status daemon on port 9001 rather than the traffic port (5001) to accurately assess the node status.
Using the traffic port would result in health check failures, causing all instances to be marked unhealthy.

Anahtar Kavram

Auto Scaling Group integration with Elastic Load Balancing health checks and health check grace periods
Bu soruyu puanla