Question

Difficulty: MediumAuto Scaling and Elasticity

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?

  1. A
    Enable detailed CloudWatch monitoring for the EC2 instances in the launch template to reduce the metric collection interval to 1 minute.
  2. B
    Increase the default scale-in cooldown period of the Auto Scaling group to restrict the scaling policy from evaluating metrics during the initialization phase.
  3. Configure an estimated instance warmup time on the scaling policy that is greater than the time required for the application to initialize.Answer
  4. D
    Create 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

1
Identify the root cause of the overprovisioning, which is that the target tracking policy does not wait for the newly launched instances to become fully ready and begin processing traffic before recalculating capacity needs.
Confirm that the scaling policy evaluates the ASG metric including warming-up instances if their warm-up time is not configured or is set too low.
This establishes that the policy needs to be aware of the instance initialization period.
2
Evaluate the available parameters for target tracking policies, and locate the estimated instance warmup parameter, which determines how long an instance is considered to be in the warm-up phase.
Determine that adjusting the estimated instance warmup will exclude these warming-up instances from the scaling calculations.
This identifies the correct mechanism to pause scaling triggers during initialization.
3
Set the estimated instance warmup value to be slightly longer than the actual boot and initialization time of the application.
The target tracking policy now ignores the newly launched instances during their startup phase and avoids triggering additional premature scale-out events.
This resolves the overprovisioning issue cleanly without breaking scaling automation.

Key Concept

Auto Scaling group instance warm-up and target tracking policy evaluation logic.
Estimated Time:1m 30s
Rate this question