🩺 Monitoring & Troubleshooting · Monitoring & Troubleshooting
Health Checks
Expose whether a service and critical dependencies are functioning.
Automation can avoid sending traffic to unhealthy instances.
A /health endpoint reports application and database connectivity status.
💡 It is like a shop's open sign that checks itself: if the lights, till and door are not all working, it flips to closed so customers are not sent in to a broken shop.
💡 Why it matters
Automated systems that route traffic or restart services need a simple, honest signal of whether an instance is actually healthy. A health check gives that signal, often confirming the application is up and its critical dependencies, like the database, are reachable. With good health checks, traffic is steered away from a sick instance automatically, so users are not sent into a broken one.
🛠️ How to achieve it
⚠️ Signs of trouble
- •Traffic keeps going to an instance that is clearly broken.
- •The health check says OK even when the database is down.
- •The check is so heavy it slows the service down.
- •There is no simple way to ask if a service is healthy.
🎯 Quick check
Score: 0/3Three questions to test the idea.
1. What does a health check mainly expose?
Answer: Whether a service and its critical dependencies are working
A health check gives an honest signal of whether an instance is actually functioning.
2. Why should a health check verify dependencies like the database?
Answer: A running process with a dead database is not truly healthy
Checking only that the process is alive can report OK while a critical dependency is broken.
3. How does honest health reporting help automation?
Answer: Traffic is steered away from unhealthy instances
When a check reports unhealthy, automation can avoid sending users into a broken instance.
