A company operates a critical web application on AWS that runs on Amazon EC2 instances inside an Auto Scaling group behind an Application Load Balancer (ALB). The instances are deployed across two Availability Zones (us-east-1a and us-east-1b) in private subnets. Outbound internet traffic for both zones is routed through a single NAT Gateway located in us-east-1a.
During sudden morning traffic spikes, CPU utilization on the EC2 instances surges to 95% within 2 minutes. The Auto Scaling group uses a target tracking policy based on average CPU utilization with a 60-second cooldown period. However, because new instances require 5 minutes to bootstrap and initialize, the Auto Scaling group launches duplicate, redundant instances during the lag, which remain idle once initialization completes. Additionally, when us-east-1a experiences an outage, instances in us-east-1b lose all outbound connectivity, failing to reach external APIs.
Which two configurations should the solutions architect implement to resolve these scaling and availability issues?
- Deploy a NAT Gateway in each Availability Zone, and update the private subnet route tables to route outbound traffic through the NAT Gateway in their respective Availability Zone.Answer
- Configure an Auto Scaling group warm pool to maintain a pool of pre-warmed instances, and increase the scaling cooldown period to exceed the instance bootstrapping and initialization time.Answer
- CKeep the single NAT Gateway in us-east-1a, and configure the route table of the private subnet in us-east-1b to route outbound traffic through the Application Load Balancer during an outage.
- DDecrease the Auto Scaling group cooldown period to 15 seconds to allow the scaling policy to react more aggressively to CPU spikes before the CPU reaches 95%.
- ESubmit a request to AWS Support to pre-warm the Application Load Balancer prior to the morning spikes to distribute traffic more evenly and prevent EC2 CPU surges.