Soru

Zorluk: ZorImplementing Auto Scaling and Fault Tolerance

A digital payment processing company hosts its core transaction API on Amazon EC2 instances within an Auto Scaling Group (ASG) behind an Application Load Balancer (ALB). The instances are deployed across three Availability Zones in private subnets, and outbound calls to external financial endpoints are routed to the internet. The EC2 instances require approximately 66 minutes to fully bootstrap, install security agents, and download application assets before they are ready to handle traffic.

During periodic flash-sale events, the system experiences the following issues:
- The transaction rate increases from 1,0001,000 requests per second (RPS) to 150,000150,000 RPS in less than 22 minutes, leading to high packet loss and 502502 Gateway Timeout errors at the ALB level.
- During scale-out events, the ASG launches a large number of EC2 instances that far exceed the required capacity, resulting in significant over-provisioning and increased compute costs.
- If one Availability Zone experiences a localized outage, outbound API requests to external financial endpoints fail for web instances located in all Availability Zones.

Which three actions should the solutions architect take to resolve these scaling, reliability, and connectivity issues?

  1. Deploy a NAT Gateway in each of the three Availability Zones, and configure the route tables of the private subnets in each zone to route outbound traffic to the local NAT Gateway.Cevap
  2. Configure the Auto Scaling Group's default cooldown period and the scaling policy's instance warmup time to 420420 seconds.Cevap
  3. Submit a ticket to AWS Support to pre-warm the Application Load Balancer with the expected traffic volume prior to the scheduled flash-sale events.Cevap
  4. D
    Configure a single NAT Gateway in a public subnet of one Availability Zone, and update the route tables of all private subnets across all three zones to use this NAT Gateway to minimize operational overhead.
  5. E
    Decrease the default cooldown period to 120120 seconds to enable the Auto Scaling Group to launch new instances more frequently when traffic rises rapidly.
  6. F
    Rely on the Application Load Balancer's native automatic scaling to handle the immediate 150150-fold traffic increase by configuring a target tracking policy based on Average Request Count per Target.

Cevap

Deploy a NAT Gateway in each of the three Availability Zones with local routing, set the Auto Scaling Group's cooldown and instance warmup times to 420420 seconds, and request AWS Support to pre-warm the Application Load Balancer prior to scheduled events.
Deploying redundant NAT Gateways per Availability Zone ensures fault-tolerant outbound connectivity, avoiding a single point of failure. Adjusting the Auto Scaling Group's cooldown and warmup times to exceed the 66-minute (360360 seconds) bootstrapping duration prevents over-provisioning by letting newly launched instances come online before additional capacity is evaluated. Requesting Application Load Balancer pre-warming from AWS Support prepares the load balancer to handle the sudden traffic surge from 1,0001,000 to 150,000150,000 RPS without dropping requests.

Adım Adım Çözüm

1
Address the single point of failure for outbound internet traffic by deploying a NAT Gateway in each Availability Zone and updating subnet route tables accordingly.
Outbound connectivity is fault-tolerant, preventing a single Availability Zone outage from affecting outbound API calls from instances in other zones.
Routing all outbound traffic through a single NAT Gateway introduces a single point of failure.
2
Align the Auto Scaling Group's default cooldown period and instance warmup time with the 66-minute bootstrapping duration of the instances.
The Auto Scaling Group will pause subsequent scaling actions until the newly launched instances are active and taking load, preventing over-provisioning.
If cooldown and warmup periods are shorter than the bootstrap time, metrics will remain high and cause unnecessary scale-out actions.
3
Request Application Load Balancer pre-warming from AWS Support prior to the scheduled flash-sale events.
The Application Load Balancer is pre-provisioned with the necessary capacity to handle the sudden, massive traffic spike without dropping connections.
An Application Load Balancer cannot scale up from 1,0001,000 RPS to 150,000150,000 RPS in less than 22 minutes without pre-warming.

Anahtar Kavram

Designing fault-tolerant outbound connectivity and aligning Auto Scaling cooldown metrics and load balancer scaling characteristics with workload requirements.
Bu soruyu puanla