BolEnglishLearn · Play · Win
Login

🩺 Monitoring & Troubleshooting · Monitoring & Troubleshooting

🩺

Health Checks

ObservabilityIntermediateModule 9

Expose whether a service and critical dependencies are functioning.

Automation can avoid sending traffic to unhealthy instances.

💡 In practice

A /health endpoint reports application and database connectivity status.

🖼️ CONCEPT PICTURE
A picture to help remember Health Checks
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.

💡 Learn🛠️ Apply🎯 Check

💡 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

1
Expose a health endpoint
Provide a simple address the system can call to ask whether this instance is working.
2
Check real dependencies
Confirm the things the service truly needs, such as the database, not just that the process is alive.
3
Keep it fast and cheap
A health check runs often, so it must answer quickly without doing heavy work.
4
Report honestly
Return unhealthy when something critical is broken so traffic is steered away instead of into the fault.

⚠️ 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.
⚠️ Common mistake: A health check that returns OK as long as the process runs, ignoring the broken database behind it. Instead, check the critical dependencies and report honestly.

🎯 Quick check

Score: 0/3

Three questions to test the idea.

  1. 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. 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. 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.

🔑 Key terms

Health endpoint
A simple address that reports if a service is working.
Dependency
Something a service needs to work, like a database.
Liveness
Whether the service process is running at all.
Readiness
Whether the service is ready to handle traffic now.

✅ Review checklist

📊 Your progress

0%
Mark this topic learned to track it.
Saved in this browser.
🚀 Got it?
Mark it learned and move to the next topic.
Next topic →