Health Check
Question
What is a health check?
Hint
Health checks enable orchestration to manage container lifecycle.
Explanation
A health check verifies if a service is healthy and ready to serve traffic. Types: 1) Liveness — is the process running? (restart if not). 2) Readiness — can it serve requests? (remove from LB if not). 3) Startup — for slow-starting apps (disable liveness during startup). In Docker: HEALTHCHECK instruction. In Kubernetes: livenessProbe, readinessProbe, startupProbe. In load balancers: health check endpoints (/health, /ready). Health checks enable: automatic restarts, traffic routing, rolling updates. Implement: return 200 if healthy, 503 if not. Check dependencies (DB, cache) in readiness, not liveness.
Related Resources
Related Lessons
- Monitoring
Learn monitoring.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.