Health and readiness
ArcFlow exposes two unauthenticated HTTP probes on the server: liveness (/health) and readiness (/ready). Use them in Docker HEALTHCHECK, Kubernetes probes, and load balancer health checks.
Implementation: server/arcflow-server/src/handlers/health.rs, ready.rs.
GET /health (liveness)
Confirms the process is running and serving HTTP.
Request: GET /health (no auth)
Response 200:
| Field | Meaning |
|---|---|
status | Always "ok" when handler runs |
version | Server crate version from build |
Use for liveness probes. A failing liveness probe means restart the pod or container.
Dockerfile built-in check:
GET /ready (readiness)
Confirms the server can accept runtime traffic: Postgres reachable and migrations current.
Request: GET /ready (no auth)
Response 200 (ready):
Response 200 (Postgres not configured):
When ARCFLOW_POSTGRESQL_URL is unset, /ready returns 200 with postgres: not_configured. This suits dev builds but not production server deployments that must serve /v1/runs.
Response 503 (degraded):
reason | Meaning | Operator action |
|---|---|---|
postgres_unavailable | Pool ping failed | Check DB connectivity, credentials, TLS |
migrations_pending | Schema behind code | Run arcflow migrate up |
migration_check_failed | Could not read migration state | Inspect logs; restore DB if corrupted |
Use for readiness probes. Remove instance from load balancer when readiness fails.
Kubernetes example
Gate Ingress or Service traffic on readiness 200 only.
Load balancer configuration
| Probe | Path | Success | Action on failure |
|---|---|---|---|
| Liveness | /health | 200 | Restart instance |
| Readiness | /ready | 200 | Stop sending new requests |
Do not use /health alone for traffic routing in production; the process may be alive while Postgres is down.
Deploy sequence integration
Recommended order:
- Start Postgres.
- Complete
arcflow migrate up. - Start server.
- Poll
/readyuntil 200 (not degraded). - Register with load balancer.
- Start Relay after server ready.
Smoke script:
Relay health
Relay does not share the same /ready semantics as the server. Monitor Relay by upstream availability and successful proxied run creation. If Relay exposes a health route in your build, use it for liveness only.
Related pages
- Migrations runbook (ArcFlow repository)
- Server deployment
- Production checklist