Soru

Zorluk: KolayImplementing Auto Scaling and Fault Tolerance

An application runs on Amazon EC2 instances behind an Application Load Balancer (ALB) inside an Auto Scaling group. The custom AMI used for the instances requires approximately 55 minutes to complete bootstrapping and start serving requests. The current Auto Scaling group cooldown is configured for 6060 seconds. During sudden traffic surges, the Auto Scaling group launches a large number of unnecessary instances, resulting in high resource waste. Additionally, instances in private subnets cannot reliably communicate with third-party APIs because all outbound internet traffic is currently routed through a single NAT Gateway located in a single Availability Zone. Which two changes should the solutions architect implement to address these scaling and fault tolerance issues?

  1. Increase the Auto Scaling group cooldown period to 360360 seconds.Cevap
  2. Deploy a NAT Gateway in each Availability Zone and update the route tables to direct outbound traffic from the private subnets to their respective local NAT Gateway.Cevap
  3. C
    Decrease the Auto Scaling group cooldown period to 3030 seconds to allow the group to add instances more rapidly.
  4. D
    Configure a single NAT Gateway in a public subnet and route outbound traffic from all private subnets across all Availability Zones to it.
  5. E
    Request that AWS Support pre-warm the Application Load Balancer to handle the instance bootstrapping delay.

Cevap

Increase the Auto Scaling group cooldown period to 360360 seconds and deploy a NAT Gateway in each Availability Zone, updating the route tables to route outbound traffic through the local NAT Gateway in each zone.
Increasing the Auto Scaling group cooldown period to 360360 seconds gives the custom AMI sufficient time to complete its 55-minute bootstrapping phase before the Auto Scaling group evaluates metrics again. This successfully resolves the redundant scaling issue. Furthermore, deploying a NAT Gateway in each Availability Zone and updating the route tables to route traffic locally ensures that outbound traffic is fault-tolerant and has no single point of failure.

Adım Adım Çözüm

1
Analyze the cause of redundant instance scaling during traffic surges.
The 6060-second cooldown is shorter than the 55-minute (300300 seconds) instance boot time, causing the group to continuously launch instances before the first ones can start serving traffic and lower metrics.
To prevent redundant launches, the cooldown period must be set longer than the bootstrapping duration (e.g., 360360 seconds).
2
Identify the outbound connectivity vulnerability.
A single NAT Gateway is a single point of failure across all Availability Zones.
To make the outbound connectivity fault tolerant, a NAT Gateway must be deployed in each Availability Zone.

Anahtar Kavram

Auto Scaling cooldown configuration and Multi-AZ NAT Gateway redundancy
Tahmini Süre:2m 0s
Bu soruyu puanla