A company hosts a web application on Amazon EC2 instances within an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The ASG is configured with default settings. During a minor software failure, the web server process on one of the EC2 instances crashes. The ALB target group health checks correctly identify the instance as unhealthy and stop routing user traffic to it. However, the ASG does not terminate or replace the unhealthy instance, leading to reduced capacity. Which action should a solutions architect take to ensure the unhealthy instance is automatically replaced?
- AImplement an Amazon Route 53 latency-based routing policy with health checks to route traffic away from the instance and notify the Auto Scaling group.
- BUpdate the Application Load Balancer target group health check to monitor the default port 80 instead of the application's actual port.
- Configure the Auto Scaling group to use Elastic Load Balancing (ELB) health checks instead of the default EC2 health checks.Cevap
- DConfigure a stateless Network ACL on the public subnet to explicitly deny inbound traffic to the instance when the application crashes.
Cevap
Configure the Auto Scaling group to use Elastic Load Balancing (ELB) health checks instead of the default EC2 health checks.
By default, an Amazon EC2 Auto Scaling group only monitors EC2 status checks (which evaluate hypervisor and hardware health). If a web server process crashes but the OS is still running, the EC2 status checks will succeed. Configuring the Auto Scaling group to use Elastic Load Balancing (ELB) health checks forces the ASG to terminate and replace instances that fail the Application Load Balancer's target group health checks, maintaining application availability.
Adım Adım Çözüm
Anahtar Kavram
Auto Scaling Group Health Check Integration with Elastic Load Balancing
Tahmini Süre:1m 30s