Health checks
Unauthenticated endpoints for uptime monitoring, load balancers, and Kubernetes probes.
Health checks
Four small endpoints expose the API's health. They are unauthenticated and safe to call from probes, monitors, and external uptime services.
| Endpoint | Method | Content-Type | Purpose |
|---|---|---|---|
/healthz | GET | text/plain | Cheap liveness — returns OK if the process is alive. |
/live | GET | application/json | Same as /healthz but JSON-shaped for K8s liveness. |
/ready | GET | application/json | Readiness — fails if the database is unreachable. |
/health | GET | application/json | Detailed status including upstream dependency health. |
/healthz
Always returns plain text OK with status 200. Use it for load-balancer health checks where bandwidth and parsing cost matter.
curl https://api.nslsolver.com/healthz
# OK/live
Liveness probe. Returns 200 with {"alive": true} whenever the HTTP handler is running. Use this in Kubernetes livenessProbe.
{ "alive": true }/ready
Readiness probe. Returns:
200with{"ready": true}when the database is reachable.503with{"ready": false}when the DB ping fails.
Use this in Kubernetes readinessProbe so traffic is taken off the pod during DB outages.
{ "ready": true }{ "ready": false }/health
Aggregate status, suitable for human-facing status pages.
{
"success": true,
"status": "up"
}status is "up" when everything is reachable, "degraded" when a dependency (like the database) is failing but the process is still serving traffic.
Probe cadence
/healthz is the cheapest probe — use it for high-frequency LB checks (every 2-5 seconds). Reserve /ready and /health for slower probes (every 10-30 seconds), since they touch the database.