Anatomy of Graceful Shutdown: Part 5

Part 5: Prometheus Graceful Shutdown Part 1: Signals and Linux Part 2: Containers and signals Part 3: Graceful shutdown of K8S pods Part 4: Celery Graceful Shutdown Part 5: Prometheus Graceful Shutdown [you’re here] Part 6: Other frameworks and libraries [WIP] AI usage disclaimer Disclaimer: this article is very experimental in the way that it relies heavily on the AI agent to do the heavy-lifting of data extraction, following the article structure and proof-reading as the articles are getting pretty procedural. Here’s the prompt. It would require tinkering around and verification, as it tends to provide wrong code links sometimes and building the narrative structure that does not make a lot of sense for the human reader. ...

July 1, 2025 · 10 min · 2121 words · Andrei Sviridov

Anatomy of Graceful Shutdown: Part 4

Part 4: Celery Graceful Shutdown Process Part 1: Signals and Linux Part 2: Containers and signals Part 3: Graceful shutdown of K8S pods Part 4: Celery Graceful Shutdown [you’re here] Part 5: Prometheus Graceful Shutdown Part 6: Other frameworks and libraries [WIP] Change of the approach We’ve had enough generic theory in previous 3 articles, covering the kernel, application, container runtimes and high-level abstractions like K8S, so what’s next? I suggest to change the flow of the articles to overview of popular backend systems and how they handle graceful shutdowns, so that we have a perspective of the topic in the wild. ...

June 30, 2025 · 10 min · 2015 words · Andrei Sviridov

Anatomy of Graceful Shutdown: Part 1

Part 1: Signals and Linux Part 1: Signals and Linux [you’re here] Part 2: Containers and signals Part 3: Graceful shutdown of K8S pods Part 4: Celery Graceful Shutdown Part 5: Prometheus Graceful Shutdown Part 6: Other frameworks and libraries [WIP] Intro There’s been quite a lot of issues surrounding application shutdowns in my line of work. Connections not being correctly closed, incoming requests being processed when they shouldn’t have been, various quirks around how new deployments affect customers during busy hours. I’ve decided to familiarize myself more with the topic and that’s quite a lot going on there. ...

March 3, 2024 · 25 min · 5230 words · Andrei Sviridov