Question

Difficulty: MediumImplementing Auto Scaling and Fault Tolerance

A financial analytics company hosts a batch processing application on Amazon EC2 instances in an Auto Scaling group (ASG) behind an Application Load Balancer. The application instances require a complex initialization script that takes approximately 88 minutes to download external libraries and establish database connection pools before they can accept traffic. The ASG uses a step scaling policy based on CPU utilization to scale out. During a rapid increase in traffic, the ASG continuously launches multiple new instances before the previously launched instances finish bootstrapping, leading to massive over-provisioning and increased costs. Which of the following configurations should a Solutions Architect implement to prevent this over-provisioning issue?

  1. Configure the estimated instance warmup time for the step scaling policy to be greater than 88 minutes (480480 seconds) to ensure that the ASG does not launch additional instances while the new instances are still bootstrapping.Answer
  2. B
    Decrease the default cooldown period of the Auto Scaling group to 6060 seconds to allow the ASG to quickly evaluate the CPU utilization metrics and terminate redundant instances.
  3. C
    Submit a request to AWS Support to pre-warm the Application Load Balancer to ensure it has sufficient capacity to handle and distribute the traffic spikes before scaling triggers are activated.
  4. D
    Consolidate the architecture to use a single NAT Gateway in a single Availability Zone for all backend subnets to reduce routing overhead and decrease the bootstrapping time.

Answer

Configure the estimated instance warmup time for the step scaling policy to be greater than 88 minutes (480480 seconds).
Configuring the estimated instance warmup time for the step scaling policy to be greater than the 88-minute bootstrapping time ensures that Amazon EC2 Auto Scaling does not launch additional instances while the previously launched instances are still in the process of starting up. This directly addresses the over-provisioning behavior caused by the lag in instance initialization.

Step-by-Step Solution

1
Analyze the cause of the Auto Scaling group's over-provisioning.
The issue is that the 88-minute bootstrapping script creates a delay before instances are ready to accept traffic and start reducing the CPU utilization metric.
Before these instances are marked as healthy and start processing requests, the scaling policy continues to evaluate high CPU utilization and triggers additional, unnecessary scale-out events.
2
Identify the scaling policy configuration parameter that handles instance bootstrapping delay.
Step scaling policies use the estimated instance warmup parameter to determine how long to wait after launching an instance before counting its impact on metrics or evaluating further scale-out actions.
By default, if there is no warmup or the warmup is shorter than the bootstrapping time, the ASG will launch additional instances during the bootstrapping window.
3
Configure the estimated instance warmup to exceed the bootstrapping time.
Setting the warmup to 88 minutes or more prevents additional scale-out actions during this initialization window, stabilizing the fleet size.
This ensures the ASG allows the newly launched instances to fully initialize and begin handling load before deciding whether more capacity is needed.

Key Concept

Instance Warmup vs Cooldown in EC2 Auto Scaling
Rate this question