Menu

Health checks in ASP.NET Core: liveness vs. readiness
📰

Health checks in ASP.NET Core: liveness vs. readiness

DEV Community: dotnet·Eduardo Teixeira·about 9 hours ago
#QTgXwk3S
#devtodotnet#devto#dev#redis#health
Long article (1080 words) — no AI summary yet.
Reading 0:00
15s threshold

This post was originally published in Portuguese on my blog: Health checks: liveness e readiness no ASP.NET Core .

We've all shipped a service that answered 200 on the health endpoint while Redis was down. Or, worse, an orchestrator that restarted the container in a loop because the health check depended on the database and the database got slow for two minutes. Both problems have the same root: a single "is it healthy?" trying to answer two different questions.

Two questions, two endpoints

The core idea is to separate liveness from readiness . Liveness asks whether the process is up and not stuck; if the answer is no, restarting fixes it. Readiness asks whether this instance can receive traffic right now; if the answer is no, the right move is to take the instance out of the load balancer and wait, without restarting anything. An external dependency being down is a readiness problem, never a liveness one.

In ASP.NET Core you solve this with tags.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.