Health check endpoint

A tiny URL like /health that the platform polls to decide whether an instance gets traffic, gets restarted, or holds up the deploy.

the /health thinghow it knows the server is uphealthcheck endpointping urlheartbeat urlliveness probereadiness probestatus page url the load balancer hits

See it

Live demo coming soon

What it is

A tiny URL, conventionally /health or /healthz, that something polls every few seconds. Who is asking matters more than the URL, because a failure means something different to each caller. A failed readiness probe takes the instance out of the load balancer's rotation, so requests go to its siblings until it recovers. A failed liveness probe tells the orchestrator the process is wedged, and typically gets it restarted. A deploy gate polling the same path decides whether a new instance is safe to promote, and halts or reverses the rollout when it is not. An external uptime monitor usually just alerts a human. One 200, four different consequences, and it is worth knowing which one you are wiring up.

That difference drives what each check should actually do. Liveness should check almost nothing: can this process answer at all. Point it at the database and a slow database becomes a restart loop across your whole fleet. Readiness can be stricter: connection pool up, required startup work finished, caches warm. Rolling and blue-green deploys both lean on readiness to know when a new instance is safe to receive traffic.

Gotcha: a health check that pings every downstream dependency turns one flaky third-party API into a cascading self-inflicted outage, because every instance marks itself unhealthy at once. Keep it cheap, give it a hard timeout, never require auth on it, exclude it from your request logs and analytics, and do not make it so shallow that it returns 200 from a process that cannot actually serve a single real request.

Ask AI for it

Add health check endpoints to this service. Expose GET /health/live that returns 200 immediately with no dependency checks (liveness), and GET /health/ready that verifies the database connection pool and any required startup work, each with a hard timeout of about one second (readiness). Return JSON with status and version, no auth, no rate limiting, excluded from request logs and analytics. Do not call third-party APIs from either endpoint. Then wire the readiness path into the load balancer and deployment config so new instances only receive traffic once they report ready.

You might have meant

smoke testrolling deploymentblue green deploymentzero downtime deployautomated rollback