Skip to content

feat(health): add liveness probe and expand readiness checks#301

Open
OlaGreat wants to merge 1 commit into
XStreamRollz:mainfrom
OlaGreat:feat/health-liveness-readiness-probes
Open

feat(health): add liveness probe and expand readiness checks#301
OlaGreat wants to merge 1 commit into
XStreamRollz:mainfrom
OlaGreat:feat/health-liveness-readiness-probes

Conversation

@OlaGreat

Copy link
Copy Markdown
Contributor

Splits the single /health endpoint into distinct Kubernetes probe targets:

  • GET /health/live (+ /health/livez alias): pure liveness probe that returns 200/ok regardless of external dependency state, preventing a transient DB outage from triggering a pod restart loop.
  • GET /health (readiness): now checks database connectivity, heap memory usage (512 MiB threshold), and event loop lag (100 ms threshold) so Kubernetes can remove an unhealthy pod from rotation without restarting it.

Adds MemoryHealthIndicator to encapsulate heap and event loop lag checks, wires it into HealthModule, and updates the k8s/20-api.yaml liveness probe path from /health/livez to the canonical /health/live.

Closes #218

Splits the single /health endpoint into distinct Kubernetes probe targets:

- GET /health/live (+ /health/livez alias): pure liveness probe that
  returns 200/ok regardless of external dependency state, preventing a
  transient DB outage from triggering a pod restart loop.
- GET /health (readiness): now checks database connectivity, heap memory
  usage (512 MiB threshold), and event loop lag (100 ms threshold) so
  Kubernetes can remove an unhealthy pod from rotation without restarting
  it.

Adds MemoryHealthIndicator to encapsulate heap and event loop lag checks,
wires it into HealthModule, and updates the k8s/20-api.yaml liveness probe
path from /health/livez to the canonical /health/live.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

obs: Implement structured health check endpoints with dependency status

1 participant