Skip to content

Health endpoints /healthz and /readyz with dependency checks #8

Description

@tayebmokni

Summary

Expose Kubernetes-style health endpoints /healthz (liveness) and /readyz (readiness) on the Go API server. /readyz should verify Postgres and Redis (when configured) are reachable.

Design reference

  • docs/00-architecture-overview.md §4 (System Topology)
  • docs/00-architecture-overview.md §6 (Phasing — P0)

Acceptance criteria

  • GET /healthz returns 200 with {"status":"ok"} regardless of dependencies
  • GET /readyz returns 200 only when pgxpool.Ping() succeeds; 503 otherwise
  • /readyz body lists checked dependencies with per-dep status
  • Endpoints excluded from auth middleware and request logging spam
  • Integration test: kill DB connection, /readyz returns 503; restore, returns 200
  • Endpoints respond in under 100ms

Dependencies

#3

Complexity

XS

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiGo HTTP API serverarea:observabilityLogs, metrics, traces, RUMgood-first-issueSuited to first-time contributorsphase:P0-skeletonPhase 0 — Skeletonpriority:P0Critical — blocks the phaseskill:goGo programmingtype:featNew feature or implementation task

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions