Soru

Zorluk: Çok zorImplementing Auto Scaling and Fault Tolerance

An enterprise web application is hosted on Amazon EC2 instances in private subnets across three Availability Zones (AZAAZ-A, AZBAZ-B, and AZCAZ-C). The instances are managed by an Auto Scaling Group (ASG) behind an Application Load Balancer (ALB). The instances execute a complex bootstrap script that downloads dependencies from external repositories, taking approximately 88 minutes to become fully operational. Outbound internet traffic is routed through a single NAT Gateway located in AZAAZ-A.

The company is preparing for a scheduled marketing campaign that will generate a massive, instantaneous 10×10\times surge in traffic. Historically, during similar events, the ALB dropped initial requests, and the ASG launched far more instances than needed, leading to unnecessary costs.

Which TWO actions should the Solutions Architect implement to improve the system's fault tolerance and optimize its scaling behavior for the campaign?

  1. Deploy an active NAT Gateway in each of the three Availability Zones and update the private subnet route tables to direct outbound traffic (0.0.0.0/00.0.0.0/0) to the local NAT Gateway within the same zone.Cevap
  2. Submit a request to AWS Support to pre-warm the Application Load Balancer to the expected peak traffic, and configure the Auto Scaling group's target tracking policy instance warmup to 540540 seconds.Cevap
  3. C
    Provision a secondary NAT Gateway in AZBAZ-B, and configure a Route 53 private hosted zone with failover routing to automatically redirect outbound traffic to the secondary NAT Gateway if the gateway in AZAAZ-A fails.
  4. D
    Reduce the Auto Scaling group's default cooldown period to 6060 seconds to ensure the ASG reacts faster to the traffic spike, and rely on the Application Load Balancer's built-in automatic scaling to handle the load.
  5. E
    Establish a launch lifecycle hook with a heartbeat timeout of 1010 minutes to delay service registration, and use a step scaling policy with a 6060-second cooldown to scale out rapidly.

Cevap

Deploying a NAT Gateway in each Availability Zone for fault tolerance, requesting AWS Support to pre-warm the Application Load Balancer to handle the instant traffic surge, and setting the Auto Scaling group instance warmup to 540 seconds to prevent over-provisioning.
Deploying a dedicated NAT Gateway in each Availability Zone ensures that a failure in one zone does not disrupt internet connectivity and bootstrapping in the remaining zones, eliminating a single point of failure. Pre-warming the Application Load Balancer ensures it is provisioned with sufficient capacity to absorb the instantaneous traffic spike without dropping initial requests. Setting the Auto Scaling group's instance warmup to 540 seconds (which is longer than the 8-minute bootstrapping time) prevents the scaling policy from launching additional instances prematurely while the initial scaling batch is still bootstrapping, avoiding over-provisioning and high costs.

Adım Adım Çözüm

1
Review the current outbound traffic path for EC2 instances in private subnets.
The single NAT Gateway in one zone is a single point of failure.
If the Availability Zone hosting the single NAT Gateway fails, instances in other zones cannot download dependencies and fail to bootstrap.
2
Determine how the Application Load Balancer handles a sudden 10×10\times traffic spike.
The load balancer needs to be pre-warmed by AWS Support.
Standard automatic scaling of the load balancer is gradual; an instantaneous surge will result in dropped requests (HTTP 503) before the load balancer can scale out.
3
Compare the instance bootstrapping time (88 minutes) with the Auto Scaling scaling metrics evaluation cycle and warmup settings.
Set the instance warmup to 540540 seconds (99 minutes).
Setting the warmup period to be longer than the 88-minute bootstrapping duration ensures that the scaling policy does not launch additional instances while the current ones are still initializing, avoiding over-provisioning.

Anahtar Kavram

Auto Scaling configuration, Application Load Balancer pre-warming, and redundant NAT Gateway design for high availability and fault tolerance.
Bu soruyu puanla