Skip to content

feat: default /livez /healthz /readyz health endpoints#114

Merged
joaomdsg merged 1 commit into
mainfrom
feat/health-endpoints
Jun 10, 2026
Merged

feat: default /livez /healthz /readyz health endpoints#114
joaomdsg merged 1 commit into
mainfrom
feat/health-endpoints

Conversation

@joaomdsg

Copy link
Copy Markdown
Member

Critic panel finding #8 (major; ops). Via shipped no health/readiness/liveness probes, so every team rolled their own.

Change

Serve GET /livez, /healthz, /readyz before the session + middleware chain, so a frequent orchestrator probe never mints a session or emits an access-log line.

  • /livez + /healthz → 200 while the process is up.
  • /readyz → 503 once Shutdown begins draining (new draining flag set at the top of Shutdown), so traffic drains away from a departing pod while liveness stays green (no force-kill mid-drain).
  • WithoutHealthEndpoints() opts out when the app needs to own those paths.

Tests

  • /livez, /healthz, /readyz → 200 on a running app
  • /readyz → 503 while draining; /livez stays 200
  • opt-out leaves the paths unclaimed (404)

Full ci-check.sh green.

No built-in health/readiness/liveness probes meant every team rolled their
own. Serve GET /livez, /healthz, /readyz before the session + middleware chain
so a frequent orchestrator probe never mints a session or emits an access log.

/livez and /healthz report 200 while the process is up. /readyz reports 503
once Shutdown begins draining (a new `draining` flag set at the top of
Shutdown) so traffic drains away from a departing pod while liveness stays
green and the pod isn't force-killed mid-drain. WithoutHealthEndpoints() opts
out when the app needs to own those paths.
@joaomdsg
joaomdsg merged commit 0719c31 into main Jun 10, 2026
4 checks passed
@joaomdsg
joaomdsg deleted the feat/health-endpoints branch June 10, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant