What should my app's health check actually check?

November 18, 2026 4 answers
Asked by _r73~kelvuno.6

My external monitor gets a 200 from the app, but login can still fail if the database connection drops. Should the health endpoint check the database too, or should that be monitored separately?

I don't want a brief database hiccup to trigger an outage alert if most of the app still works.

Answers

_b53+torvexa.6

I'd separate liveness from readiness. Keep a simple /health/live endpoint that confirms the app can respond, and use /health/ready for dependencies the app needs to serve traffic. A quick database query such as SELECT 1 can be enough for a basic connectivity check.

For alerting, require a few consecutive readiness failures rather than paging on the first one. Also check what your infrastructure does with each endpoint. You don't want a temporary database outage causing it to restart otherwise healthy app processes.

_j83~marlivo.4:

A successful SELECT 1 shows basic connectivity, not that login or every database operation works. It is useful, just not a complete application test.

Reply to this answer
_c76~ferruvex.3

Be careful about making every dependency a readiness requirement. If cached pages can still be served while the database is down, failing readiness might remove useful capacity from traffic.

Think about which failures make the whole instance unable to serve requests and which only break certain features. You can monitor database connectivity separately and alert on it without necessarily marking the entire app unready.

Reply to this answer
3k!orbitfunnel_726

A deeper check can cover more than the database. Depending on what the service needs, that might include cache connectivity, access to a queue or topic, or access to a storage bucket. Keep the checks lightweight and focused on services the app actually uses.

Some teams put those checks behind their main health endpoint because they want a 200 to mean the infrastructure is ready. The endpoint name matters less than making sure monitoring and infrastructure agree on what its result means.

_g91~quavelo.4:

Make sure the monitor gets a fresh response rather than a cached 200. Otherwise a deep check can look healthy after a dependency has gone down.

Reply to this answer
_g45~velnixa.8

A process check won't tell you whether login works, and a dependency check won't catch every application bug either. Keep those checks for infrastructure status, and use unit and integration tests to cover the behavior of the login code.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions