Question

Difficulty: MediumHigh-Performing and Elastic Compute Solutions

A financial services provider hosts a transactional processing application on Amazon EC2 instances within an Auto Scaling group behind an Application Load Balancer (ALB). The application requires a complex bootstrap process—including downloading security certificates and loading a large dataset into local memory—which takes approximately 6 minutes before the instance can pass health checks. During sudden market volatility, rapid traffic spikes overload the existing instances, causing request timeouts before new instances can finish bootstrapping. Which solution will most effectively minimize the latency of scaling out the compute capacity?

  1. Implement an Amazon EC2 Auto Scaling warm pool to maintain a pool of pre-initialized instances in a Stopped state, and use lifecycle hooks to run the bootstrap steps before the instances are stopped.Answer
  2. B
    Modify the Auto Scaling group launch template to deploy the EC2 instances inside a cluster placement group to maximize throughput and accelerate the data transfer during bootstrapping.
  3. C
    Configure the ALB target group health check to query a lightweight secondary port that responds immediately upon instance startup, allowing the instance to receive traffic while bootstrapping in the background.
  4. D
    Migrate the application to AWS Lambda and configure Provisioned Concurrency to handle the spikes, keeping the execution environments active continuously to process the transactional workloads.

Answer

Implement an Amazon EC2 Auto Scaling warm pool to maintain a pool of pre-initialized instances in a Stopped state, and use lifecycle hooks to run the bootstrap steps before the instances are stopped.
Implementing a warm pool with pre-initialized instances in a Stopped state allows the Auto Scaling group to rapidly scale out. When a scaling event is triggered, the instances only need to be started, skipping the 6-minute bootstrap process. Using lifecycle hooks ensures that the bootstrapping is completed before the instance is stopped and placed in the pool.

Step-by-Step Solution

1
Analyze the bottleneck during scale-out events.
The bottleneck is the 6-minute bootstrap process required for new instances to become healthy.
Before solving the scaling latency, we must identify that the delay is caused by application initialization rather than network or load balancer provisioning.
2
Evaluate solutions that bypass or pre-run the initialization phase.
Amazon EC2 Auto Scaling warm pools allow instances to be launched, initialized, and then stopped or kept in a warm state.
By pre-initializing instances, they can be brought into service almost immediately when a scale-out event occurs, eliminating the 6-minute bootstrap time.
3
Verify that lifecycle hooks are used correctly with the warm pool.
Lifecycle hooks ensure the bootstrap script completes fully before the instance is put into the warm pool.
This guarantees that instances are fully ready to process transactions the moment they are started.

Key Concept

Amazon EC2 Auto Scaling Warm Pools allow applications with long initialization times to scale out rapidly by maintaining a pool of pre-initialized instances.
Estimated Time:2m 0s
Rate this question