Soru

Zorluk: OrtaAuto Scaling and Elastic Load Balancing (ELB)

A company runs a high-traffic web application on Amazon EC2 instances managed by an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The application handles long-lived WebSocket connections and standard HTTP requests. During scale-in events, users complain that their active WebSocket sessions are abruptly terminated. Additionally, during sudden traffic surges, the ASG fails to scale out quickly enough because the default scaling metric (average CPU utilization) does not immediately reflect the sudden increase in connection volume. Which two actions should the solutions architect take to resolve these issues? (Select two.)

  1. Increase the deregistration delay (connection draining) timeout value for the Application Load Balancer target group to allow active connections to persist during scale-in.Cevap
  2. Configure a target tracking scaling policy for the Auto Scaling group using the Application Load Balancer request count per target metric.Cevap
  3. C
    Adjust the Application Load Balancer target group health check configuration to use port 80 instead of the custom application port to match the listener port.
  4. D
    Modify the security groups associated with the EC2 instances to allow outbound ephemeral port traffic to the load balancer, ensuring return traffic is not blocked.
  5. E
    Configure an Amazon Route 53 latency routing policy pointing directly to the individual EC2 instances to distribute connection volume based on client proximity.

Cevap

The correct actions are to increase the deregistration delay timeout for the target group and to configure a target tracking scaling policy for the Auto Scaling group using the Application Load Balancer request count per target metric.
To prevent active WebSocket connections from being terminated abruptly when an EC2 instance is being decommissioned during scale-in, the deregistration delay (connection draining) timeout on the target group should be increased. This allows the load balancer to keep existing connections open until they complete or the timeout expires. To address the slow scaling issue, using the Application Load Balancer request count per target metric in a target tracking policy provides a direct, immediate indicator of request volume changes, allowing the Auto Scaling group to scale out faster than it would when relying solely on CPU utilization metrics, which have a delayed response to sudden network spikes.

Adım Adım Çözüm

1
Analyze the connection termination issue during scale-in events.
Identify that the default deregistration delay (connection draining) timeout is too short for long-lived WebSocket connections, causing them to be terminated when instances are decommissioned.
Increasing this timeout allows the load balancer to drain active connections gracefully.
2
Analyze the slow scale-out issue during sudden traffic spikes.
Determine that CPU utilization is a lagging indicator for connection-heavy or network-bound sudden spikes, whereas Application Load Balancer request count per target responds immediately to traffic increases.
Configuring a target tracking policy based on target request count allows the ASG to scale out rapidly as request volume spikes.

Anahtar Kavram

Graceful connection management via ELB connection draining and rapid scaling using load balancer metrics.
Bu soruyu puanla