liveBook · Manning

Health check

As explained in Designing AI Systems

A health check is an automated test that determines whether a running service instance is functioning and able to receive work.

A health check is an automated test that tells an orchestrator whether a running service instance is functioning and able to receive work. Production systems commonly separate process survival from traffic eligibility: a live container may still be starting, draining requests, or unable to serve traffic. section 9.3.3

Use two deliberately shallow endpoints with different operational responsibilities:

  • /health/live returns HTTP 200 while the server process is running and handling requests. Failure signals an unrecoverable condition such as a deadlock or out-of-memory state, allowing the orchestrator to restart the container. section 9.3.3
  • /health/ready returns HTTP 200 only when the container can accept traffic. During startup it can remain live while importing modules, initializing the platform, or establishing gateway connections. section 9.3.3
  • During graceful shutdown, readiness changes to HTTP 503 so load balancing stops sending new requests while in-flight work completes. section 9.3.3

Zero-downtime deployment

A replacement container starts and becomes ready before receiving traffic. An old container reports itself not ready, finishes its in-flight requests, and exits. The gateway then routes traffic across the current set of healthy replicas without dropping requests or requiring a maintenance window. section 2.4.4 section 9.3.3

Keep probes shallow: verify that the server is responsive rather than testing every dependency. Checking a gateway channel or making a Session Service call can couple container health to dependency health and trigger inappropriate recovery. section 9.3.3

How Designing AI Systems covers it

How deep it goes
Distinguishes endpoint behavior and lifecycle effects, but stops short of implementation code or dependency-specific checks.
Examples
Uses HTTP 200 and 503 responses, startup initialization, dependency connection, request draining, and rolling replica replacement.
What you can do after
Operate/configure service lifecycle behavior by separating restart signals from traffic-readiness signals.
How it connects
Connects liveness probes, readiness probes, container orchestration, graceful shutdown, service registries, and zero-downtime deployment.

Also explained in

Compare how 11 books explain health check →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing AI Systems. The section links point to the parts of the book it draws on.