Skip to content
Latchkey

Graceful Shutdown - CI/CD Glossary Definition

Graceful shutdown lets a service finish in-flight requests and close connections cleanly before exiting.

Graceful shutdown is stopping a service by finishing in-flight requests and closing connections cleanly before exiting, usually triggered by a SIGTERM. It prevents dropped requests during a deploy or scale-down.

On SIGTERM, a well-behaved service stops accepting new work, drains active requests, and then exits. This avoids the errors clients would see from an abrupt kill during a rollout.

Signal

Orchestrators send SIGTERM first and wait a grace period, then SIGKILL. Handling SIGTERM to drain requests is what makes shutdown graceful.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →