A digital media platform hosts a live-streaming transcoding application on Amazon EC2 instances in an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The instances are deployed across three Availability Zones (, , and ) in private subnets. Outbound connectivity to external video ingestion APIs is routed through a single NAT Gateway located in .
During scheduled major sporting events, traffic spikes instantly from to requests per second. During these events, two major failures occur:
1. The ALB drops initial connections with HTTP and errors.
2. The ASG launches a large number of instances that remain in a pending state while downloading and compiling transcoding binaries (which takes minutes). Because the average CPU utilization remains high during this startup window, the ASG continuously launches more instances than required, causing a severe cost overrun.
The company requires a solution that eliminates connection drops, prevents over-provisioning during scale-out, and ensures that outbound connectivity is resilient to an Availability Zone outage. Which solution meets these requirements with the lowest operational overhead?
- AConfigure an Amazon CloudFront distribution in front of the ALB to cache dynamic transcoding requests. Increase the ASG's default cooldown period to seconds and configure a step scaling policy based on CPU utilization. Deploy a NAT Gateway in each of the three Availability Zones, and update the route table of each private subnet to route outbound traffic through its local NAT Gateway.
- BRequest AWS Support to pre-warm the ALB based on the expected traffic profile. Configure a lifecycle hook for the ASG to keep instances in the `Pending:Wait` state while compiling binaries, and complete the lifecycle action once healthy. Configure a target tracking scaling policy with an `EstimatedInstanceWarmup` of seconds. Deploy a single NAT Gateway in , and update the route tables of private subnets in and to use the NAT Gateway in as a backup if fails.
- Request AWS Support to pre-warm the ALB based on the expected traffic profile. Configure a lifecycle hook for the ASG to keep instances in the `Pending:Wait` state while compiling binaries, and complete the lifecycle action once healthy. Configure a target tracking scaling policy with an `EstimatedInstanceWarmup` of seconds. Deploy a NAT Gateway in each of the three Availability Zones, and update the route table of each private subnet to route outbound traffic through its local NAT Gateway.Cevap
- DRequest AWS Support to pre-warm the ALB based on the expected traffic profile. Configure a lifecycle hook for the ASG to keep instances in the `Pending:Wait` state while compiling binaries, and complete the lifecycle action once healthy. Configure a target tracking scaling policy with an `EstimatedInstanceWarmup` of seconds. Update the route tables of all private subnets to route outbound traffic through a Transit Gateway connected to a central VPC containing a single NAT Gateway in .