Health
Endpoints for monitoring server health and readiness.
GET /health
Comprehensive health check with component status.
Response 200
{
"status": "healthy",
"checks": {
"database": {
"status": "up",
"latency_ms": 12
},
"tariffs": {
"status": "up",
"count": 19228
},
"embeddings": {
"status": "up",
"count": 48230
}
},
"version": "1.0.0"
}Status Logic
| Overall Status | Condition |
|---|---|
healthy | All checks pass |
degraded | Database is up but embeddings unavailable |
unhealthy | Database is down |
Component Checks
| Component | Status Values | Description |
|---|---|---|
database | up / down | PostgreSQL connection check with latency |
tariffs | up / down | Tariff table has data |
embeddings | up / unavailable / down | Embedding table has data |
GET /ready
Kubernetes-style readiness probe. Returns 200 if the service is fully ready to handle requests, 503 otherwise.
Response 200
{
"ready": true
}Response 503
{
"ready": false,
"reason": "Database connection failed"
}Usage
Use this endpoint for:
- Kubernetes readiness probes
- Load balancer health checks
- Startup verification scripts
The readiness check requires all components to be healthy. If you need a more lenient check (e.g., accepting degraded mode), use the /health endpoint and check individual component statuses.