Question

Difficulty: HardImplementing Auto Scaling and Fault Tolerance

An online learning platform hosts its virtual classroom service on Amazon EC2 instances in an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The instances process real-time WebSocket connections and video streaming metadata. The application requires approximately 8 minutes8\text{ minutes} (480 seconds480\text{ seconds}) to download container images, run local database migrations, and pass application-level health checks. The platform experiences sudden spikes in users at the start of every hour. During these spikes, the ALB returns HTTP 503503 errors for the first 10 minutes10\text{ minutes}, and the ASG launches three times as many instances as needed, causing a significant budget overrun. Additionally, if an Availability Zone fails, outbound API calls to external video rendering services fail for instances running in the remaining healthy zones because all outbound traffic is routed through a single NAT gateway in the affected Availability Zone.

Which configuration changes should a solutions architect implement to resolve these issues? (Select TWO.)

  1. Deploy a NAT gateway in each Availability Zone, and update the route tables of the private subnets in each zone to route outbound traffic (0.0.0.0/00.0.0.0/0) through the NAT gateway in the same zone.Answer
  2. Increase the default instance warmup time in the Auto Scaling group's target tracking scaling policy to at least 540 seconds540\text{ seconds}, and configure an Auto Scaling warm pool to keep pre-warmed instances ready to transition to the running state.Answer
  3. C
    Reduce the default cooldown period of the Auto Scaling group to 120 seconds120\text{ seconds} to allow the scaling policy to react faster to sudden load spikes at the start of each hour.
  4. D
    Submit a request to AWS Support to pre-warm the Application Load Balancer before the start of each hour, and rely on the ALB's target tracking policy to scale the backend EC2 instances.
  5. E
    Configure a single NAT gateway in a public subnet spanning all Availability Zones, and update the private route tables to route all outbound traffic (0.0.0.0/00.0.0.0/0) to this NAT gateway.

Answer

Deploy a NAT gateway in each Availability Zone with local routing, and increase the default instance warmup time in the Auto Scaling group's target tracking scaling policy to at least 540 seconds540\text{ seconds} along with an Auto Scaling warm pool.
To achieve high availability and fault tolerance for outbound internet traffic, a NAT gateway must be deployed in each Availability Zone, with the private subnet route tables configured to point outbound traffic to the local NAT gateway. To resolve the Auto Scaling group launch loop caused by the 8 minutes8\text{ minutes} bootstrapping time, the default instance warmup time must be configured to be longer than the boot time (such as 540 seconds540\text{ seconds}). This prevents the target tracking policy from launching additional instances before the newly booted ones register as healthy and decrease the metric average. A warm pool also helps by keeping pre-warmed instances ready, reducing the time to bring new instances into service.

Step-by-Step Solution

1
Analyze the NAT gateway failure pattern.
Identify that the current architecture uses a single NAT gateway in one Availability Zone, which represents a single point of failure for all instances in other Availability Zones during a zone outage.
To ensure fault-tolerant outbound connectivity, outbound traffic must be distributed across redundant NAT gateways located in each Availability Zone.
2
Address the Auto Scaling group launch loop and boot delay.
Determine that the EC2 boot lag (8 minutes8\text{ minutes} / 480 seconds480\text{ seconds}) is causing the ASG to launch extra instances because the scaling metric does not reflect the capacity of booting instances.
By setting the default instance warmup time to at least 540 seconds540\text{ seconds} (which exceeds the 480 seconds480\text{ seconds} boot time), the scaling policy will wait for newly launched instances to begin contributing to metrics before triggering another scaling activity. The warm pool further reduces this delay.

Key Concept

Configuring redundant NAT gateways for Availability Zone resilience and adjusting Auto Scaling metrics (instance warmup and warm pools) to align with instance bootstrapping times.
Rate this question