Soru

Zorluk: OrtaAuto Scaling and Elastic Load Balancing (ELB)

A company hosts a web application on Amazon EC2 instances within an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The solutions architect notices that when the application on an EC2 instance crashes and returns HTTP 5xx errors, the ALB marks the instance as unhealthy, but the ASG does not terminate or replace the instance. What configuration change should the solutions architect make to ensure that the ASG automatically replaces instances that fail the application-level health checks?

  1. A
    Change the target group health check port settings to query port 80, while the application server remains bound to port 8080.
  2. B
    Configure a stateful rule in the subnet's Network Access Control List (NACL) to track and automatically allow return traffic for the health check requests.
  3. Configure the Auto Scaling group to use ELB health checks instead of EC2 health checks.Cevap
  4. D
    Replace the Application Load Balancer with an Amazon Route 53 latency routing policy configured with health checks to route user traffic directly to the EC2 instances.

Cevap

Configure the Auto Scaling group to use ELB health checks instead of EC2 health checks.
The correct action is to configure the Auto Scaling group (ASG) to use Elastic Load Balancing (ELB) health checks. By default, an ASG only monitors EC2 status checks (system and instance status). When the ELB health check type is enabled, the ASG monitors the health status of the instances in the target group. If the Application Load Balancer (ALB) marks an instance as unhealthy (e.g., due to failing application-level HTTP health checks), the ASG will automatically terminate and replace that instance, maintaining application availability.

Adım Adım Çözüm

1
Analyze why the Auto Scaling group is not replacing the instances.
By default, the Auto Scaling group uses EC2 status checks (hardware and hypervisor checks), which show the instances as healthy even if the application running on them has crashed.
To fix this, the ASG must be configured to check the application health rather than just the instance status.
2
Select the appropriate health check mechanism.
The Application Load Balancer already performs application-level health checks and marks instances as unhealthy when they return 5xx errors.
By changing the ASG's health check type to ELB, the ASG will query the target group's health status and replace instances that fail ELB health checks.

Anahtar Kavram

Auto Scaling Group Health Check Configuration
Bu soruyu puanla