NSLSolver
API Reference

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.

EndpointMethodContent-TypePurpose
/healthzGETtext/plainCheap liveness — returns OK if the process is alive.
/liveGETapplication/jsonSame as /healthz but JSON-shaped for K8s liveness.
/readyGETapplication/jsonReadiness — fails if the database is unreachable.
/healthGETapplication/jsonDetailed 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:

  • 200 with {"ready": true} when the database is reachable.
  • 503 with {"ready": false} when the DB ping fails.

Use this in Kubernetes readinessProbe so traffic is taken off the pod during DB outages.

200 — ready
{ "ready": true }
503 — not ready
{ "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.

On this page