Skip to content

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

Merged
Xhristin3 merged 1 commit into
XStreamRollz:mainfrom
OlaGreat:feat/health-liveness-readiness-probes
Jun 20, 2026
Merged

feat(health): add liveness probe and expand readiness checks#301
Xhristin3 merged 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>

@Xhristin3 Xhristin3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean split between liveness and readiness, and the MemoryHealthIndicator thresholds plus the k8s manifest update make this deploy-ready. Approving and merging.

@Xhristin3 Xhristin3 merged commit 39a5f2e into XStreamRollz:main Jun 20, 2026
2 checks passed
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

2 participants