health check

A regular automated test of whether a program or service is working, such as a request to its health endpoint or a command run inside its container.

In more detail

Orchestrators, load balancers and container runtimes use health checks to decide whether to send traffic to a service or restart it. A check only proves what it actually tests: a process can pass a check that measures itself while its real work fails.

Examples

Health checks decide whether a replica gets traffic or is replaced during a rolling update, but a scheduler can report healthy processes while users receive errors, so pair them with user-focused indicators.
HEALTHCHECK CMD wget -qO- http://localhost:8000/health || exit 1
Kubernetes splits health checks into liveness, readiness and startup probes.
In the worked outage, a payment dependency times out while the health check stays green: "up" is not the same as "working".
In this course: An integration test should wait until its dependency reports healthy before using it, instead of sleeping for an arbitrary time. For a database that usually means running a trivial query such as select 1.

Related terms

Taught in

References

Certification courses