A company runs a high-traffic e-commerce platform where a fleet of Amazon EC2 instances in an Auto Scaling group (ASG) serves traffic behind an Application Load Balancer (ALB). During a peak shopping event, several instances experience application-level crashes and stop responding to HTTP requests, but the EC2 status checks show the instances are healthy. The ALB marks the instances as unhealthy and stops sending them traffic, but the Auto Scaling group does not replace them. Which configuration change should the solutions architect make to ensure unhealthy instances are automatically replaced?
- Update the Auto Scaling group health check type from EC2 to ELB.Answer
- BReconfigure the Application Load Balancer target group health check to query a default port such as port 80, regardless of the application's actual listening port.
- CCreate stateless Network Access Control List (Network ACL) rules to monitor target instance health and terminate unresponsive instances.
- DConfigure an Amazon Route 53 latency-based routing policy with target health evaluation to identify and terminate the failed instances.
Answer
Update the Auto Scaling group health check type from EC2 to ELB.
By default, an Auto Scaling group (ASG) only monitors EC2 status checks. If an application crashes but the operating system and VM remain responsive, the EC2 status checks will pass, and the ASG will not replace the instance. Changing the health check type of the ASG to ELB allows the ASG to use the Application Load Balancer's target group health checks. When the ALB marks an instance as unhealthy, the ASG will automatically terminate and replace it.
Step-by-Step Solution
Key Concept
Auto Scaling Group Health Check Type
Estimated Time:45s