Connection Draining
ELI5 - The Vibe Check
When you're taking a server out of rotation, whether for deployment or scaling down, you don't want to just yank it away mid-request and cut people off. Connection draining tells the load balancer to stop sending it new traffic while letting its existing in-flight requests finish naturally, up to a time limit. It's the difference between slamming a store's door in a customer's face and just flipping the sign to closed while finishing up whoever's already at the register.
Real Talk
Connection draining (also called deregistration delay) is a load balancer feature that stops routing new requests to a target being removed from service while allowing existing in-flight connections to complete, up to a configured timeout, before forcibly terminating them. It's essential for zero-downtime deployments and autoscaling scale-in events, preventing dropped requests when instances are terminated, and works alongside readiness and health checks to coordinate safe traffic shifts.
When You'll Hear This
"We set the draining timeout to 30 seconds so in-flight uploads have time to finish." / "Without connection draining, every deploy was dropping a handful of live requests."
Related Terms
Auto Scaling
Auto scaling is when the cloud automatically adds more servers when traffic spikes and removes them when it drops, so you're not paying for idle machines a...
Blue-Green Deployment
Blue-green deployment means running two identical production environments — Blue (current) and Green (new).
Circuit Breaker
Circuit Breaker is like the electrical circuit breaker in your house.
Load Balancer
A load balancer is like a traffic cop for servers.
Load Shedding
Load shedding is intentionally dropping some requests when your server is overwhelmed so it can keep serving the rest.