Question

Difficulty: MediumAuto Scaling and Elastic Load Balancing (ELB)

A company hosts a high-traffic e-commerce platform on Amazon EC2 instances managed by an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). During flash sales, the ASG scales out rapidly. However, newly launched EC2 instances are immediately bombarded with a large volume of requests before they can complete their initialization tasks, such as pre-populating local caches. This causes the instances to become overloaded, fail health checks, and be prematurely terminated by the ASG. Additionally, when the flash sale ends and the ASG scales in, clients with active checkout connections receive HTTP 504 Gateway Timeout errors because their sessions are abruptly severed.

Which combination of actions should a Solutions Architect take to resolve these issues? (Select two.)

  1. Configure a slow start duration in the Application Load Balancer target group settings.Answer
  2. Increase the deregistration delay timeout in the Application Load Balancer target group settings.Answer
  3. C
    Configure an Amazon Route 53 latency routing policy with health checks to route client traffic directly to individual EC2 instance IP addresses.
  4. D
    Configure stateful Network ACL rules on the application subnets to temporarily block incoming connections to new instances until their cache is populated.
  5. E
    Modify the target group's health check configuration to query a default port such as port 80 instead of the custom application port to prevent early health check failures.

Answer

Configure a slow start duration in the Application Load Balancer target group settings, and increase the deregistration delay timeout in the Application Load Balancer target group settings.
Configuring a slow start duration in the Application Load Balancer target group settings allows newly launched EC2 instances to receive a linearly increasing share of requests, preventing them from being overwhelmed before completing cache pre-population. Increasing the deregistration delay timeout ensures that during Auto Scaling group scale-in, active checkout connections have sufficient time to complete their transactions before the target is fully deregistered and terminated, avoiding HTTP 504 Gateway Timeout errors.

Step-by-Step Solution

1
Address the initialization overload issue by enabling slow start.
The Application Load Balancer will linearly ramp up the volume of requests sent to newly registered EC2 instances, giving them time to populate their local database cache before handling full production load.
Newly launched instances require a warm-up period to initialize caches without being overwhelmed by immediate full request volumes.
2
Address the connection termination issue during scale-in by adjusting the deregistration delay.
The Application Load Balancer will keep existing connections open for the specified duration, allowing active checkout requests to complete before the instances are terminated.
Without a sufficient deregistration delay, active client requests are terminated abruptly when the Auto Scaling group terminates instances during scale-in, causing client-side HTTP 504 errors.

Key Concept

Application Load Balancer Target Group configuration (Slow Start and Deregistration Delay) to manage EC2 instance lifecycle under Auto Scaling events.
Estimated Time:2m 0s
Rate this question