Question

Difficulty: Very hardImplementing Auto Scaling and Fault Tolerance

A company runs a high-volume financial transaction application on Amazon EC2 instances within an Auto Scaling group (ASG) distributed across three Availability Zones (AZ1AZ-1, AZ2AZ-2, and AZ3AZ-3). The instances reside in private subnets and must connect to external payment APIs to process requests. All private subnets currently route internet-bound traffic through a single NAT Gateway located in a public subnet in AZ1AZ-1. The application requires exactly 77 minutes to bootstrap, initialize caches, and pass Application Load Balancer (ALB) health checks. During sudden, unscheduled traffic surges, the application experiences two main failures: first, the ALB drops requests and returns 503 errors before the ASG can scale; second, the ASG continuously launches new instances in rapid succession, resulting in severe over-provisioning and the premature termination of active instances. Additionally, a recent localized utility outage in AZ1AZ-1 disabled the single NAT Gateway, which halted all outbound payment processing for instances running in AZ2AZ-2 and AZ3AZ-3.

Which TWO actions should the Solutions Architect take to resolve these issues while ensuring maximum fault tolerance and scaling efficiency?

  1. Deploy a dedicated NAT Gateway in the public subnet of each Availability Zone, and update the route tables of the private subnets in each zone to point outbound 0.0.0.0/00.0.0.0/0 traffic to the NAT Gateway in their respective zone.Answer
  2. Modify the Auto Scaling group scaling policies to use target tracking and set the instance warmup duration to 480480 seconds.Answer
  3. C
    Reduce the default cooldown period of the Auto Scaling group to 300300 seconds to allow scaling policies to execute more rapidly during sudden peaks.
  4. D
    Deploy an additional NAT Gateway in AZ2AZ-2, and update the route tables of private subnets in both AZ2AZ-2 and AZ3AZ-3 to point outbound 0.0.0.0/00.0.0.0/0 traffic to this new NAT Gateway to distribute outbound NAT traffic.
  5. E
    Submit a ticket to AWS Support to request permanent pre-warming of the Application Load Balancer to its maximum anticipated capacity to absorb unscheduled traffic surges.

Answer

Deploy a dedicated NAT Gateway in the public subnet of each Availability Zone, and update the route tables of the private subnets in each zone to point outbound traffic to the local NAT Gateway. Additionally, configure the Auto Scaling group to use target tracking and set the instance warmup duration to 480480 seconds.
The correct options are deploying a dedicated NAT Gateway in the public subnet of each Availability Zone and modifying the Auto Scaling group to set the instance warmup duration to 480480 seconds. Deploying a NAT Gateway in each Availability Zone ensures high availability and fault tolerance, isolating failures to a single zone. Setting the instance warmup duration to 480480 seconds (88 minutes) ensures that the Auto Scaling group waits for the newly launched instances to fully initialize (which takes 77 minutes) before evaluating capacity metrics again, resolving the over-provisioning loop.

Step-by-Step Solution

1
Analyze the NAT Gateway architecture for single points of failure.
Identify that routing all outbound traffic from private subnets across three Availability Zones to a single NAT Gateway in AZ1AZ-1 creates a single point of failure.
To build a fault-tolerant architecture, we must eliminate single points of failure. Deploying a NAT Gateway in each AZ ensures local outbound routing remains active even if one AZ experiences an outage.
2
Address the Auto Scaling over-provisioning issue related to instance initialization time.
Determine that the application requires 77 minutes (420420 seconds) to pass health checks, which means any warmup or cooldown period less than 420420 seconds will cause the ASG to scale out repeatedly before the first batch of instances can handle the load.
Increasing the instance warmup duration to a value greater than the bootstrap time (e.g., 480480 seconds) ensures that the scaling policy ignores newly launched instances for metrics aggregation until they are ready to handle traffic, preventing over-provisioning.
3
Evaluate options for managing Application Load Balancer scaling and pre-warming.
Confirm that ALBs scale dynamically but cannot be pre-warned permanently for unscheduled spikes. Instead, scaling policies must be configured with appropriate metrics and warmup times to handle normal scaling, while utilizing caching or queuing to absorb instantaneous shock loads if necessary.
This rules out permanent pre-warming requests to AWS Support as a viable architectural solution.

Key Concept

Designing multi-AZ fault tolerance for NAT Gateways and configuring Auto Scaling group cooldown and warmup periods to align with application bootstrapping latency.
Rate this question