Soru

Zorluk: OrtaImplementing Auto Scaling and Fault Tolerance

A media streaming company runs a metadata caching service on Amazon EC2 instances in an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The instances require a complex initialization sequence to download and cache local reference datasets, which takes approximately 8 minutes to complete. The company observes that during sudden traffic surges, the ASG launches new instances, but the CPU utilization on existing instances remains high. As a result, the ASG continuously launches more instances until the maximum group size is reached, leading to excessive costs and overall service instability. Which configuration change will prevent the ASG from launching unnecessary instances while ensuring the system can eventually scale to meet the demand?

  1. A
    Decrease the default cooldown period of the Auto Scaling group to 60 seconds to allow the system to respond faster to traffic surges.
  2. B
    Submit a support case to AWS to request pre-warming of the Application Load Balancer to handle the sudden capacity increase.
  3. Configure a target tracking scaling policy with the instance warmup set to 540 seconds to prevent the group from launching additional instances before the new instances complete initialization.Cevap
  4. D
    Deploy a NAT Gateway in each Availability Zone used by the Auto Scaling group to ensure high availability of outbound connections during scaling events.

Cevap

Configure a target tracking scaling policy with the instance warmup set to 540 seconds to prevent the group from launching additional instances before the new instances complete initialization.
Configuring the target tracking scaling policy with an instance warmup period that exceeds the bootstrapping time (540 seconds > 480 seconds / 8 minutes) ensures that newly launched instances do not contribute to the Auto Scaling group's aggregated metric calculation until they are ready to handle traffic. This prevents the scaling policy from initiating subsequent scale-out actions while the first set of instances is still bootstrapping.

Adım Adım Çözüm

1
Analyze the instance lifecycle timeline and determine the time required for bootstrapping.
The instances take 8 minutes (480 seconds) to complete initialization and become operational.
Understanding the delay between instance launch and actual capacity availability is key to configuring the scale-out metric calculation.
2
Identify the root cause of the continuous scaling loop.
Newly launched instances are included in the group's aggregate CPU metric before they are ready, showing 0% utilization, but existing instances are still overloaded, causing the average CPU metric to remain high and trigger further scale-outs.
This explains why the Auto Scaling group continues launching instances up to its maximum capacity.
3
Configure the instance warmup setting on the Auto Scaling group scaling policy to exceed the bootstrapping time.
Setting the warmup to 540 seconds (9 minutes) ensures the instances are excluded from metric calculations until they are fully functional.
This stops the scaling policy from initiating new launches during the bootstrap window, preventing resource and cost bloat.

Anahtar Kavram

Auto Scaling group instance warmup configuration to accommodate instance bootstrapping time.
Bu soruyu puanla