Interview Prep/Networking/Load Balancing, Proxies & CDN

A user reports that long-lived WebSocket connections drop after 60 seconds behind your ALB. What do you change?

IntermediateScenarioLoad Balancing, Proxies & CDN
Answer

Situation read → The ALB idle timeout default is 60 seconds and WebSocket idle periods hit it.

What I'd do →

  1. Raise the ALB idle timeout: aws elbv2 modify-load-balancer-attributes --load-balancer-arn <arn> --attributes Key=idle_timeout.timeout_seconds,Value=3600
  2. Send application-level pings every 20 to 30 seconds
  3. Make sure backend and proxies in between (Nginx proxy_read_timeout) allow the same duration
  4. Reconnect with backoff on the client

Why → The weakest timeout in the chain wins; every hop needs a matching value.

Interview tip → Say the keepalive from the app must be shorter than the LB idle timeout.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancing, Proxies & CDN