Search⌘ K
AI Features

Connection Draining and Deregistration

Explore how connection draining and deregistration delay work to maintain active connections during target removal from AWS load balancers. Understand configuration methods using AWS CLI, SDKs, and CloudFormation. Learn to monitor deregistration with CloudWatch and X-Ray to optimize deployments and prepare for the AWS Certified Developer Associate exam.

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 ...