Performance: Health checks in Docker
MEDIUM IMPACT
Health checks affect container startup time and runtime responsiveness by controlling when Docker considers a container ready or healthy.
HEALTHCHECK CMD curl -f http://localhost:8080/actuator/health || exit 1
HEALTHCHECK CMD curl -f http://localhost:8080/ || exit 1
| Pattern | CPU/Network Load | Container Restarts | App Responsiveness | Verdict |
|---|---|---|---|---|
| Simple HTTP check on root path | Low | High (false positives) | Unstable | [X] Bad |
| Health endpoint with frequent checks | High | Medium | Potentially slow | [!] OK |
| Health endpoint with tuned interval and timeout | Low | Low | Stable and responsive | [OK] Good |