# Connection Draining/Deregistration Delay

* **For CLBs, it is called Connection Draining**.
  * But, **for Target Groups (so ALBs and NLBs), it called Deregistration Delay**.<br>

* To ensure that a **Load Balancer stops sending requests to instances that are de-registering or unhealthy**, while keeping the existing connections open, use connection draining.

  * This **enables the load balancer to complete in-flight requests made to instances that are de-registering or unhealthy**.

* When you enable connection draining, you **can specify a maximum time for the load balancer to keep connections alive before reporting the instance as de-registered**.
  * The **maximum timeout value can be set between 1 and 3,600 seconds** (the **default is 300 seconds**).
    * **When the maximum time limit is reached, the load balancer forcibly closes connections** to the de-registering instance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://karansingh.gitbook.io/aws-saa-c02/elb/connection-draining-deregistration-delay.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
