Soru

Zorluk: ZorImplementing Auto Scaling and Fault Tolerance

A media streaming provider operates an on-demand video transcoding platform. The media processing API runs on Amazon EC2 instances inside an Auto Scaling Group (ASG) behind an Application Load Balancer (ALB). The instances are deployed across two Availability Zones (AZ-A and AZ-B) in private subnets. The application instances require a bootstrapping script that takes approximately 88 minutes to pull Docker images and initialize transcoding engines.

During a highly advertised live sporting event, a sudden influx of transcoding requests caused:
1. The ALB to drop connection requests with HTTP 502502 and 504504 errors during the first 1010 minutes of the surge.
2. The ASG to over-provision by launching hundreds of unnecessary instances because the CPU utilization metric remained elevated while the initial batch of instances was still bootstrapping.
3. Complete failure of outbound API callbacks to external payment gateways when AZ-A suffered a localized power disruption, as both private subnets routed internet-bound traffic through a single NAT Gateway in AZ-A.

Which combination of architectural improvements should the Solutions Architect implement to resolve these issues?

  1. A
    Configure the ALB with an Elastic IP address to handle the sudden capacity increase. Set the ASG target tracking policy's estimated instance warmup to 300300 seconds. Deploy a NAT Gateway in the public subnet of each Availability Zone, and configure the private route tables to route all outbound traffic through the primary NAT Gateway in AZ-A unless it becomes unavailable.
  2. Request AWS Support to pre-warm the ALB to the expected capacity prior to the event. Configure target tracking scaling policies on the ASG with the estimated instance warmup set to 540540 seconds. Deploy a NAT Gateway in the public subnet of each Availability Zone, and update the route tables of the private subnets to direct outbound traffic to the local NAT Gateway in their respective zones.Cevap
  3. C
    Request AWS Support to pre-warm the ALB to the expected capacity prior to the event. Configure target tracking scaling policies on the ASG with the estimated instance warmup set to 300300 seconds. Deploy a single NAT Gateway in the public subnet of AZ-A, and configure the route tables of both private subnets to route outbound traffic through this single gateway.
  4. D
    Rely on the ALB's automatic scaling mechanism to adapt to the traffic surge. Configure target tracking scaling policies on the ASG with the estimated instance warmup set to 540540 seconds. Deploy a single NAT Gateway in the public subnet of AZ-B, and configure the route tables of both private subnets to route outbound traffic through this single gateway.

Cevap

The correct solution is to pre-warm the Application Load Balancer (ALB) before the event, configure the Auto Scaling Group's estimated instance warmup to 540540 seconds to cover the 88-minute bootstrapping process, and deploy a NAT Gateway in both Availability Zones with local route table configurations.
The correct solution resolves the load balancing capacity issue by pre-warming the load balancer before the scheduled sporting event, prevents auto-scaling over-provisioning by setting the estimated instance warmup time to 540540 seconds (which is longer than the 88-minute bootstrapping time), and ensures high availability for outbound traffic by deploying a NAT Gateway in each Availability Zone with local routing.

Adım Adım Çözüm

1
Address the initial load balancer connection failures by pre-provisioning capacity.
Pre-warming the Application Load Balancer (ALB) ensures that it has sufficient capacity partitioned before the event, avoiding HTTP 502502 and 504504 errors during sudden surges.
Standard ELB auto-scaling is reactive and cannot scale rapidly enough to absorb massive, instantaneous surges in request rates.
2
Configure the scaling policy metrics to accommodate instance bootstrap lag.
Setting the estimated instance warmup parameter in the target tracking policy to 540540 seconds (greater than the 88-minute or 480480-second bootstrap time) delays metric aggregation for newly launched instances.
This prevents the Auto Scaling Group from launching additional, redundant instances while the initial batch is still preparing to accept traffic.
3
Ensure outbound connectivity redundancy across Availability Zones.
Deploying a NAT Gateway in the public subnet of both Availability Zones and pointing the local private subnet route tables to their respective local NAT Gateways provides zone-independent outbound routing.
If outbound traffic routes through a single NAT Gateway, any outage affecting that gateway's Availability Zone will break internet connectivity for all private subnets across the entire architecture.

Anahtar Kavram

Continuous optimization of scaling dynamics and fault-tolerant routing configurations in multi-AZ environments.
Bu soruyu puanla