Health and Readiness
Health and readiness answer different operational questions.
Health says the process is alive. Readiness says the App can serve traffic safely.
Health
curl http://localhost:3000/-/healthGenerated Apps return a fixed 200 response:
{"status":"ok"}Health does not run dependency checks. Use it for container liveness and "is the process answering HTTP?" probes.
Readiness
curl http://localhost:3000/-/readyGenerated Apps return:
200with{"status":"ready"}when all readiness checks pass503with{"status":"not_ready"}when any readiness check fails
Readiness checks run against the enabled infrastructure components and use a short per-check timeout. Failed readiness checks are logged server-side.
Authorized Readiness
Detailed readiness output should require:
Authorization: Bearer $APP_DIAG_TOKENPublic readiness omits raw dependency errors and infrastructure details. Authorized readiness includes structured checks with type, name, driver, status, and the raw error for failed checks.
Example authorized failure shape:
{
"status": "not_ready",
"checks": [
{
"type": "db",
"name": "default",
"driver": "mysql",
"status": "failed",
"error": "dial tcp 127.0.0.1:3306: connect: connection refused"
}
]
}Health Command
Generated Apps include a health command that queries a live App without booting local runtime dependencies.
./bin/app health --probe ready --failThe command defaults to http://127.0.0.1:3000, uses ready by default, and automatically sends Authorization: Bearer $APP_DIAG_TOKEN for readiness when the token is configured.
What To Check
Readiness can cover:
- database connectivity
- required storage disks
- required cache accessors
- queue backend readiness
- event backend readiness
- generated component state
Optional facilities should report degraded state instead of crashing unrelated runtimes when the App is designed to tolerate degradation.
Common Mistakes
Common mistakes
- Do not expose raw dependency errors publicly.
- Do not use health checks for expensive dependency probes.
- Do not mark the App ready before required dependencies are available.
- Do not hide degraded optional resources as silent emptiness.
