Skip to main content

Health Endpoints

Health endpoints require no authentication and are used by load balancers and monitoring systems.

Liveness Probe

GET /healthz

Returns 200 if the server is running. Does not check database connectivity.

Response (200)

{
"status": "ok",
"version": "1.0.0",
"uptime_seconds": 3600
}

Usage

Kubernetes liveness probe — restart the container if this fails.

livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10

Readiness Probe

GET /readyz

Returns 200 if the server is ready to accept requests. Checks both PostgreSQL and ClickHouse connectivity.

Response (200)

{
"status": "ready",
"checks": {
"postgres": "ok",
"clickhouse": "ok"
}
}

Response (503)

{
"status": "not_ready",
"checks": {
"postgres": "ok",
"clickhouse": "connection refused"
}
}

Usage

Kubernetes readiness probe — stop routing traffic if this fails.

readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 10
periodSeconds: 15