π‘
Connection Draining / Deregistration Delay
- CLB calls it Connection Draining
- ALB and NLB call it Deregistration Delay
- Ensures in-flight requests complete before an instance is removed (deregistered or marked unhealthy)
- LB stops sending new requests to the instance while itβs draining
- Configurable time: 1β3600 seconds (default 300s)
- Use a shorter delay for short-lived requests to speed up deployments
Use Case
- Gracefully shut down instances during:
- Deployments
- Auto Scaling down events
- Maintenance operations
- Prevents user disruption by letting current requests finish
Behavior
- Draining state:
- Existing connections are served until completion
- No new connections sent to that target
- New traffic is routed to healthy targets only