12. Reliability and observabilityHealth checks
Health checks
A health check is a small endpoint or test that a platform like Kubernetes or a load balancer calls regularly to ask a running service “are you OK?” and act on the answer. There are two distinct questions. Liveness asks whether the process is stuck or broken beyond repair, and a failure means “restart me”. Readiness asks whether it can handle traffic right now, and a failure means “stop sending me requests for a while”, useful during startup or when overloaded. Mixing them up causes outages: if the liveness check depends on the database, a brief database blip makes every instance fail at once and get restarted together, turning a small problem into a total one.
In this lesson: A Kubernetes-style sim.