Soru

Zorluk: ZorImplementing Auto Scaling and Fault Tolerance

A media broadcasting platform operates a real-time interactive audience response system on Amazon EC2 instances in an Auto Scaling Group (ASG) behind an Application Load Balancer (ALB). The instances run in private subnets across two Availability Zones (AZ-A and AZ-B). A single NAT Gateway is deployed in AZ-A to enable outbound internet access for API integrations.

During a scheduled live broadcast, traffic spikes instantly from 500 requests per second to over 80,000 requests per second within 90 seconds. The application experiences elevated latencies, HTTP 503 Service Unavailable errors, and connection timeouts. A review of CloudWatch metrics shows:
1. The ALB drops connections immediately at the start of the traffic surge due to capacity constraints before it can scale.
2. The ASG launches new instances in response to CPU utilization metrics, but because the custom application initialization script takes 150 seconds to complete, the ASG continues to launch additional, unnecessary instances every 60 seconds.
3. An infrastructure outage in AZ-A causes outbound API calls on instances in AZ-B to fail.

Which combination of actions will resolve the scalability and fault-tolerance issues while preventing the provisioning of unnecessary instances?

  1. Submit a request to AWS Support to pre-warm the Application Load Balancer prior to the scheduled broadcast. Deploy a NAT Gateway in AZ-B, and update the route table of the private subnets in AZ-B to route outbound traffic to the local NAT Gateway. Configure the Auto Scaling Group's scaling policy with an instance warmup period of 180 seconds.Cevap
  2. B
    Rely on the Application Load Balancer's automatic scaling behavior to handle the traffic surge. Deploy a NAT Gateway in AZ-B, and update the route table of the private subnets in AZ-B to route outbound traffic to the local NAT Gateway. Configure the Auto Scaling Group's scaling policy with an instance warmup period of 180 seconds.
  3. C
    Submit a request to AWS Support to pre-warm the Application Load Balancer prior to the scheduled broadcast. Deploy a NAT Gateway in AZ-B, and update the route table of the private subnets in AZ-B to route outbound traffic to the local NAT Gateway. Configure the Auto Scaling Group to use simple scaling policies with a cooldown period of 60 seconds to rapidly provision resources.
  4. D
    Submit a request to AWS Support to pre-warm the Application Load Balancer prior to the scheduled broadcast. Retain the single NAT Gateway in AZ-A to optimize costs, and establish a cross-AZ route from the private subnets in AZ-B to the NAT Gateway in AZ-A. Configure the Auto Scaling Group's scaling policy with an instance warmup period of 180 seconds.

Cevap

Submit a request to AWS Support to pre-warm the Application Load Balancer prior to the scheduled broadcast. Deploy a NAT Gateway in AZ-B, and update the route table of the private subnets in AZ-B to route outbound traffic to the local NAT Gateway. Configure the Auto Scaling Group's scaling policy with an instance warmup period of 180 seconds.
The correct configuration resolves all three architectural issues. Pre-warming the ALB ensures that the load balancer is scaled to the expected capacity beforehand, eliminating initial connection drops. Deploying a NAT Gateway in each Availability Zone removes the single point of failure, enabling fault-tolerant outbound connectivity. Setting the instance warmup period to 180 seconds prevents the Auto Scaling Group from launching unnecessary instances by allowing the custom bootstrap script to complete initialization before evaluating further scaling.

Adım Adım Çözüm

1
Address the immediate ALB scaling bottleneck.
By pre-warming the ALB via AWS Support before the scheduled live broadcast, the ALB is pre-provisioned with adequate capacity to handle the sudden surge to 80,000 requests per second without dropping connections.
Standard ALB auto-scaling is reactive and cannot scale fast enough to meet an instantaneous surge of this magnitude.
2
Resolve the multi-AZ outbound routing fault tolerance issue.
Deploying a separate NAT Gateway in AZ-B and updating the local private subnet route table ensures that instances in AZ-B route outbound internet traffic through their local NAT Gateway.
This removes the dependency on AZ-A, ensuring high availability and local outbound routing even if AZ-A suffers a failure.
3
Optimize the Auto Scaling Group configuration to prevent over-provisioning.
Setting the instance warmup period to 180 seconds ensures that the ASG waits for the newly launched instances to complete their 150-second initialization and registration process before evaluating metrics for further scaling.
This prevents the ASG from launching redundant, unnecessary instances while existing instances are still bootstrapping.

Anahtar Kavram

Designing highly available, fault-tolerant, and cost-optimized scaling architectures for unpredictable or rapid traffic surges on AWS.
Bu soruyu puanla