Back to Catalog
Microservices
Observability
Health Check API
Give your service a /health endpoint — let infra know if it's actually ready to serve traffic.
Intent & Description
Real-world Use Case
K8s readiness probe hits /health every 10s. Order Service loses DB connection → /health returns 503. K8s removes it from the load balancer. No user-facing errors. DB reconnects → /health returns 200 → back in rotation.
Source
📌 TL;DR
/health is your service’s “I’m okay” signal to infra. If it’s not there, you’re flying blind in production.
Advantages
- Infra auto-detects and isolates degraded instances
- Kubernetes/ECS native — probes integrate directly
- Distinguishes process-alive from traffic-ready (liveness vs readiness)
- Fast incident detection without manual monitoring
Disadvantages
- Health checks themselves can fail or become stale
- Aggressive probes can overwhelm downstream dependencies
- False positives if check logic is too broad
- Needs maintenance as dependencies change