...
/Connection Draining and Deregistration
Connection Draining and Deregistration
Learn how to implement connection draining and configure deregistration delays in ELB to ensure smooth deployments and high availability without disrupting active user sessions.
Understanding how AWS handles traffic when targets are removed from service is critical for the AWS Certified Developer – Associate (DVA-C02) exam. The connection draining concept, specifically deregistration delay, is central to maintaining service continuity during deployments or auto scaling events. This ensures smoother deployments and graceful scale-in events. In ALBs and NLBs, the deregistration delay parameter defines how long the target remains in service to finish active connections before removal.
Connection draining, also known as deregistration delay, is a process that gives a target (e.g., an EC2 instance) time to complete in-flight requests before it’s removed from a load balancer’s target group. When a target is set for deregistration (either manually or via an Auto Scaling event), the load balancer stops sending new requests to it but continues to allow existing connections to drain for a specified period.
Deregistration is the act of removing a target from a load balancer’s target group. Once deregistered, the load balancer will no longer send traffic to that target.
Note: If the deregistration delay is too short, in-flight requests may be terminated prematurely, leading to failed transactions or a poor user experience. On the other hand, overly long delays can ...