Skip to content

feat(health): implement GET /live and /ready health probes (#334) - #534

Closed
sparkysolutions10-pixel wants to merge 1 commit into
Divinity-Labs:mainfrom
sparkysolutions10-pixel:feat/health-ready-probe-334
Closed

sparkysolutions10-pixel wants to merge 1 commit into
Divinity-Labs:mainfrom
sparkysolutions10-pixel:feat/health-ready-probe-334

Conversation

@sparkysolutions10-pixel

Copy link
Copy Markdown
Contributor

Closes #334

Summary of Changes

  • Implements /live probe answering 200 { "status": "live" } without database or external dependency overhead.
  • Implements /ready probe checking boot initialization lifecycle (src/bootState.ts) and active connectivity to PostgreSQL and Redis.
    • Returns 503 { "status": "unhealthy", "checks": { "database": ..., "redis": ... } } during boot or when Postgres is down.
    • Returns 200 { "status": "ready", ... } once boot completes and dependencies are reachable.
  • Both /live and /ready are marked public: true, allowlisted from the rate limiter in src/app.ts, and excluded from httpMetrics route cardinality in src/middleware/httpMetrics.ts.
  • Preserves /status unchanged.
  • Fully registered in openapi.yaml/openapi.json and verified with automated unit tests in src/__tests__/healthProbes.test.ts.

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.

There is no readiness check, only a status page

1 participant