An application hosted on Amazon EC2 instances in an Auto Scaling group (ASG) processes traffic from an Application Load Balancer. The ASG is configured with a target tracking scaling policy based on average CPU utilization. During a sudden traffic spike, the CPU utilization increases significantly. The ASG launches a new batch of instances, but before these instances can complete their initialization and begin serving traffic, the scaling policy triggers another scale-out action. This results in the ASG launching more instances than necessary. Which action should the SysOps administrator take to resolve this issue?
- AEnable detailed CloudWatch monitoring for the EC2 instances in the launch template to reduce the metric collection interval to 1 minute.
- BIncrease the default scale-in cooldown period of the Auto Scaling group to restrict the scaling policy from evaluating metrics during the initialization phase.
- Configure an estimated instance warmup time on the scaling policy that is greater than the time required for the application to initialize.Answer
- DCreate an Amazon EventBridge rule that detects the EC2 Instance Launch Successful event and triggers an AWS Systems Manager Automation document to temporarily suspend the launch process of the Auto Scaling group.
Answer
Configure an estimated instance warmup time on the scaling policy that is greater than the time required for the application to initialize.
Configuring an estimated instance warmup ensures that newly launched instances are excluded from the Auto Scaling group's capacity calculations while they are booting up. This prevents the target tracking scaling policy from launching additional instances prematurely while the initial batch is still warming up.
Step-by-Step Solution
Key Concept
Auto Scaling group instance warm-up and target tracking policy evaluation logic.
Estimated Time:1m 30s