FileNest/Docs

Health Endpoints

The FileNest API exposes two health probe endpoints that follow the Kubernetes convention. No authentication is required.

Liveness probe

GET /health/live
GET /health         ← alias, for backwards compatibility

Returns 200 OK as long as the process is running. No dependency checks are performed — this endpoint is intentionally lightweight so that a pod is only restarted when the process itself is unresponsive.

Response 200:

{ "status": "ok" }

Readiness probe

GET /health/ready

Returns 200 only when all downstream dependencies are reachable. Returns 503 with a degraded status if any check fails, signalling to the load-balancer to remove the pod from rotation until it recovers.

Response 200 — all healthy:

{
  "status": "ok",
  "checks": {
    "database": "ok",
    "cache": "ok"
  }
}

Response 503 — dependency unavailable:

{
  "status": "degraded",
  "checks": {
    "database": "ok",
    "cache": "unavailable"
  }
}
CheckWhat it tests
databaseSELECT 1 against the primary PostgreSQL pool
cachePING against the Redis instance

Kubernetes configuration example

livenessProbe:
  httpGet:
    path: /health/live
    port: 8000
  initialDelaySeconds: 10
  periodSeconds: 30
 
readinessProbe:
  httpGet:
    path: /health/ready
    port: 8000
  initialDelaySeconds: 15
  periodSeconds: 10
  failureThreshold: 3