Health endpoints¶
The health server runs on a dedicated port (default 8081) in a background daemon thread, separate from the Zope WSGI server.
It answers even when all Zope worker threads are busy.
The health server is started by the egg:plone.observability#healthserver WSGI filter.
It is not started on Zope process startup, so zconsole and script runs never touch the health port.
See How to install plone.observability for wiring the filter.
Endpoints¶
/liveLiveness check. Answers whether the process is alive. Must not depend on the database or any external service.
/readyReadiness check. Answers whether the process can currently serve requests. Evaluates the registered readiness checks, including ZODB connectivity.
/startupStartup check. Answers whether the process has finished initializing. Evaluates the readiness checks itself and latches on the first success: once it turns green, it stays green.
The /startup latch is deliberate.
Kubernetes does not run the readiness probe until the startup probe has succeeded, so /startup cannot depend on /ready having been polled first.
It must stand on its own.
Response format¶
All endpoints return JSON.
The HTTP status is 200 on success and 503 on failure.
{
"status": "ok",
"checks": {
"zodb": {"ok": true, "message": "ZODB connection ok"}
}
}
Each entry in checks is keyed by the check name and reports a boolean ok and a human-readable message.
See also
About health probes explains why there are three separate probes and why the server runs on its own port. How to configure Kubernetes health probes shows how to point Kubernetes at these endpoints.