Soru

Zorluk: Çok zorImplementing Auto Scaling and Fault Tolerance

A company runs a high-performance e-commerce platform on AWS. The web application tier runs on Amazon EC2 instances managed by an Auto Scaling group (ASG) behind an Application Load Balancer (ALB) across three Availability Zones (AZAAZ-A, AZBAZ-B, and AZCAZ-C). The EC2 instances are launched in private subnets, and all outbound traffic is routed through a single NAT Gateway located in AZAAZ-A.

During flash sale events, the platform experiences immediate traffic surges where request volume increases from 500 requests/sec500\text{ requests/sec} to over 150000 requests/sec150{}000\text{ requests/sec} within 2 minutes2\text{ minutes}. During these surges, the ALB returns HTTP 502 (Bad Gateway) and HTTP 504 (Gateway Timeout) errors. Furthermore, the EC2 instances require 8 minutes8\text{ minutes} to download application binaries and complete bootstrapping. Because the ASG is configured with a default cooldown period of 180 seconds180\text{ seconds}, the ASG launches a large number of redundant instances during scale-out, resulting in high costs and API rate-limiting from backend databases. Finally, during a recent power outage in AZAAZ-A, all outbound transactions failed, even though the instances in AZBAZ-B and AZCAZ-C remained healthy.

Which combination of architectural modifications will resolve the scaling, reliability, and fault tolerance issues? (Select TWO.)

  1. Deploy a NAT Gateway in each of the three Availability Zones (AZAAZ-A, AZBAZ-B, and AZCAZ-C) and configure the route table of each private subnet to route outbound traffic through the NAT Gateway in its respective Availability Zone.Cevap
  2. Configure the Auto Scaling group default cooldown and dynamic scaling policy warmup periods to 600 seconds600\text{ seconds}, and request AWS Support to pre-warm the Application Load Balancer with the expected traffic profile before scheduled flash sale events.Cevap
  3. C
    Create a standby NAT Gateway in AZBAZ-B and implement a custom AWS Lambda function to update the private subnet route tables to point to the standby NAT Gateway if the primary NAT Gateway in AZAAZ-A becomes unavailable.
  4. D
    Decrease the default cooldown period of the Auto Scaling group to 60 seconds60\text{ seconds} to allow the group to scale out faster, and use the Application Load Balancer API to trigger automated pre-warming when scale-out events are initiated.
  5. E
    Enable Cross-Zone Load Balancing on the Application Load Balancer to distribute the immediate surge evenly across all Availability Zones, and configure a lifecycle hook to temporarily suspend scaling policies during instance bootstrapping.

Cevap

Deploying a dedicated NAT Gateway in each of the three Availability Zones, updating the route tables accordingly, increasing the Auto Scaling group cooldown and warmup periods to 600 seconds600\text{ seconds}, and requesting AWS Support to pre-warm the Application Load Balancer before the scheduled flash sale events.
Deploying a NAT Gateway in each Availability Zone ensures that a failure in one zone does not disrupt the outbound connectivity of instances in other healthy zones, providing high availability. Configuring the Auto Scaling group cooldown and warmup periods to 600 seconds600\text{ seconds} provides a sufficient window for the 8 minutes8\text{ minutes} required for custom AMI bootstrapping, preventing the launch of redundant instances. Finally, requesting ELB pre-warming from AWS Support prepares the Application Load Balancer to handle the sudden burst of 150000 requests/sec150{}000\text{ requests/sec} without dropping connections.

Adım Adım Çözüm

1
Analyze the fault tolerance issue regarding outbound traffic failures during Availability Zone A outage.
Identify that routing all private subnet traffic through a single NAT Gateway in AZAAZ-A creates a single point of failure. Deploying a dedicated NAT Gateway in each of the three Availability Zones (AZAAZ-A, AZBAZ-B, and AZCAZ-C) and updating subnet route tables ensures high availability and local zone isolation.
This guarantees that an outage in one zone does not impact the outbound internet access of instances running in other healthy zones.
2
Analyze the Application Load Balancer failures during sudden flash traffic surges.
Recognize that a rapid jump from 500 requests/sec500\text{ requests/sec} to 150000 requests/sec150{}000\text{ requests/sec} within 2 minutes2\text{ minutes} exceeds the default scaling rate of an Application Load Balancer. Pre-warming the Application Load Balancer via a request to AWS Support is required to pre-provision capacity before the scheduled event.
Without pre-warming, the Application Load Balancer cannot scale its load-balancing nodes quickly enough, resulting in dropped connections and HTTP 502/504 errors.
3
Analyze the Auto Scaling group redundant instance launching issue.
Compare the instance bootstrapping time (8 minutes8\text{ minutes} or 480 seconds480\text{ seconds}) against the default cooldown (180 seconds180\text{ seconds}). Because the cooldown is shorter than the boot time, the group initiates additional scaling actions before the newly launched instances start reporting metrics. Adjusting the cooldown and warmup periods to 600 seconds600\text{ seconds} resolves the scaling loop.
This allows newly launched instances sufficient time (8 minutes8\text{ minutes} to boot plus buffer) to start handling load and lower the metric average before the Auto Scaling group evaluates further scaling activities.

Anahtar Kavram

Ensuring high availability and correct scaling behaviors by deploying redundant NAT Gateways per Availability Zone, aligning Auto Scaling cooldown periods with instance boot times, and pre-warming Application Load Balancers for massive flash traffic spikes.
Bu soruyu puanla