Question

Difficulty: HardHigh-Performing and Elastic Compute Solutions

A media streaming platform runs a real-time video transcoding service on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer. The transcoding application is highly CPU-intensive, and each instance takes approximately 10 minutes to boot, initialize the transcoding software, and download heavy model files from Amazon S3 before it can begin processing traffic. During sudden traffic spikes, users experience severe playback delays because the Auto Scaling group cannot provision new instances fast enough to handle the load.

Which combination of actions will provide the most elastic and high-performing architecture to handle these spikes? (Select TWO.)

  1. Configure an Auto Scaling group warm pool with instances in a Stopped state to maintain a pool of pre-initialized instances.Answer
  2. Configure a lifecycle hook on the Auto Scaling group to pause the instance launch and keep it in the Pending:Wait state while initialization scripts run.Answer
  3. C
    Migrate the video transcoding service to AWS Lambda to run the continuous, long-running transcoding workloads and eliminate scaling latency.
  4. D
    Deploy the transcoding instances in a Spread Placement Group across multiple Availability Zones to accelerate the operating system boot time.
  5. E
    Configure the Application Load Balancer target group health check to query the default HTTP port 80, while configuring the transcoding service to listen on port 8080.

Answer

Configure an Auto Scaling group warm pool with instances in a Stopped state to maintain a pool of pre-initialized instances, and configure a lifecycle hook on the Auto Scaling group to pause the instance launch and keep it in the Pending:Wait state while initialization scripts run.
To handle sudden traffic spikes for an application with a long initialization time, we must reduce the time it takes for new instances to become ready. Configuring an Auto Scaling warm pool allows instances to be pre-initialized and kept in a Stopped state, which reduces the scale-out time to under a minute because the boot and initialization processes have already occurred. Combining this with a lifecycle hook ensures that the instance remains in a Pending:Wait state while its startup scripts complete, preventing the load balancer from sending traffic to the instance before it is ready to process it.

Step-by-Step Solution

1
Analyze the scaling bottleneck.
Identify that the 10-minute boot and initialization duration is the root cause of the latency during traffic spikes.
Before deciding on a solution, we must pinpoint why the Auto Scaling group fails to handle sudden load changes in a timely manner.
2
Select a mechanism to pre-provision and pre-initialize compute capacity.
Choose Auto Scaling warm pools with Stopped instances.
Warm pools keep a pool of stopped, pre-initialized instances ready. This bypasses the 10-minute setup overhead when scaling out, as the instances only need to be started rather than booted from scratch.
3
Implement a lifecycle hook to synchronize state initialization.
Use a lifecycle hook to hold the instance in a Pending:Wait state.
This guarantees that the instance does not prematurely receive client traffic before the transcoding software and models are fully loaded.

Key Concept

Auto Scaling Warm Pools and Lifecycle Hooks for Speeding Up Instance Provisioning
Rate this question