The simplest health check answers one question: is this process able to accept a connection? That is useful, and it is also much less than most teams assume. An endpoint that returns 200 OK because the HTTP server is still listening will keep sending traffic to a process that cannot reach its database, has lost its credentials, or is stuck behind a full thread pool.

Two questions, two endpoints

Liveness and readiness look similar in a config file and mean different things in an incident.

The deep check trap

The instinct is to make the check thorough: database, cache, queue, third-party API. It feels responsible. In practice it couples every instance to every dependency and turns a partial dependency failure into a full outage, because the load balancer removes all instances at once.

A health check that fails when a non-critical dependency is slow is a self-inflicted denial of service.

If a dependency genuinely cannot be served without, check it — but with a tight timeout, a cached result, and a plan for what happens when the check itself is the slowest thing in the system.

Make the answer boring

A good endpoint is cheap, fast, and uninformative to strangers:

Alert on symptoms

A health check is a routing decision, not a monitoring strategy. Users experience latency and errors, so alert on those. The probe exists to keep traffic away from an instance that cannot serve it, and to do so quietly, in seconds, without becoming a second incident of its own.

← All notes