A route that always returns 200 tells you the process is alive. It does not tell you the service works. This post separates the three checks people mix up.
Liveness
"Is the process running?" Cheap, and useful for restarts. It cannot tell you about a broken database.
Readiness
"Can this service do its job right now?" Check what it needs: the database accepts connections, a required config is present. Keep it cheap, because it runs constantly.
A tool that waits on readiness, not on process start, avoids the classic bug where the API boots before Postgres.
Smoke tests
"Does one real path work from end to end?" A smoke test can run as a health check and behave like a tiny end-to-end test. It catches what the other two miss.
A good smoke test touches the write path, not only SELECT 1. A read-only replica can pass a read check while writes fail. Decide what your smoke test writes, and clean it up.
A simple rule set
- Liveness: process only.
- Readiness: the dependencies this service needs.
- Smoke: one real user path.
- Never make one route do all three.
- Break a dependency on purpose and see which check turns red.
In a local stack
Poll flisk status until resources are ready, and read logs from the first failure. up returns before the stack is healthy.
Pick the check that matches the question you are asking.

Top comments (0)