Types
- Liveness — is the process alive? If not — restart it. Simple:
GET /up → 200 OK - Readiness — is it ready to accept traffic? Checks DB, Redis, and dependency connections. If not — remove from the load balancer, but do not restart
- Startup probe — extra time during startup (long bootstrap)
What to check in readiness
- DB connection (ping)
- Redis connection
- Critical external services
- Sufficient free memory and disk space
Response format
GET /health
→ 200 {"status":"ok","db":"ok","redis":"ok"}
→ 503 {"status":"degraded","db":"error"}