IT lexicon › Infra & Ops › Health-check endpoint

Health-check endpoint

Infra & Ops På svenska → Updated: 2026-05-29

A special URL (often /healthz or /readyz) that a service exposes solely to report its own health. Load balancers, Kubernetes probes, and monitoring systems call it to decide whether the service should receive traffic.

Pattern: the service responds 200 OK if it's healthy, otherwise an error code. Two depths: a shallow (liveness) check (does the process respond at all?) and a deep (readiness) check (can it actually do its job — does it reach the database, has it filled its cache?). The convention /healthz comes from Google/Kubernetes (the z to avoid clashing with real pages). Use case: Kubernetes liveness/readiness probes call it, load balancers stop sending traffic to an instance whose health check fails, and service discovery filters out unhealthy instances. Pitfall: a too-deep health check (testing all dependencies) can cause cascading failures — if a shared database becomes slow, ALL services report unhealthy and are taken out of traffic at once → design them carefully. A cornerstone of self-healing, observable systems. Related to readiness probe and service discovery.

← Back to the lexicon