Question

Difficulty: EasyImplementing Auto Scaling and Fault Tolerance

An application is hosted on Amazon EC2 instances in an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The instances are deployed in private subnets across two Availability Zones. The instances need to access the internet to download updates and call payment gateways. During peak trading hours, the company notices that if a single Availability Zone experiences an outage, outbound payment API calls fail. Additionally, during sudden spikes in user activity, the ASG launches too many instances before the recently launched instances finish bootstrapping, leading to increased costs. Which two actions should a Solutions Architect take to improve the fault tolerance and responsiveness of the application?

  1. Deploy a NAT Gateway in each Availability Zone and configure the route tables of each private subnet to route outbound traffic through its corresponding local NAT Gateway.Answer
  2. Increase the Auto Scaling group cooldown or warmup period to align with the instance bootstrapping duration, preventing the launch of additional instances until the previous ones are fully operational.Answer
  3. C
    Deploy a single NAT Gateway in one Availability Zone's public subnet and configure all private subnet route tables to direct outbound traffic to this gateway.
  4. D
    Configure a very short Auto Scaling group cooldown period of 1010 seconds to force the rapid launch of multiple instances as soon as any CPU threshold is breached.
  5. E
    Submit a support ticket to pre-warm the Application Load Balancer for all dynamic scaling events to prevent connection timeouts during sudden spikes.

Answer

Deploy a NAT Gateway in each Availability Zone and route local private subnet traffic through them; also increase the Auto Scaling group cooldown or warmup period to match the instance bootstrapping duration.
Deploying a NAT Gateway in each Availability Zone ensures that outbound network connectivity remains functional even if an entire zone experiences an outage. Aligning the Auto Scaling group cooldown or warmup period with the duration of the instance bootstrapping process prevents over-provisioning by allowing recently launched instances to start reporting metrics before the group initiates further scaling actions.

Step-by-Step Solution

1
Ensure outbound connectivity is fault-tolerant by deploying a NAT Gateway in every Availability Zone used by the private subnets.
If an Availability Zone goes offline, the private subnets in the remaining zones still have local NAT Gateways to reach the payment gateways.
This eliminates the single point of failure associated with a single NAT Gateway configuration.
2
Analyze the instance boot and bootstrapping time, then adjust the Auto Scaling group's cooldown or warmup period accordingly.
The Auto Scaling group will pause after a scale-out event, allowing the new instances to boot, start serving traffic, and report metrics before determining if more instances are needed.
This prevents unnecessary instance launches and reduces costs during rapid scaling events.

Key Concept

Designing multi-AZ fault tolerance for outbound internet traffic and configuring Auto Scaling group cooldown limits to match application bootstrap times.
Rate this question