connection draining

Stopping new traffic to a backend while letting its existing connections finish, before removing or restarting it.

In more detail

It avoids cutting users off mid-request during deployments, restarts and maintenance. Load balancers and orchestrators usually allow only a limited time for draining before closing any connections that remain.

Examples

In AWS: Letting a server finish the requests it already has, while sending it no new ones, before it is stopped or removed.
Skipping the drain during a deploy shows up as 502 Bad Gateway errors.

Related terms

Taught in

References