Active vs Passive Health Checks
What you'll learn: The two fundamental approaches load balancers use to detect unhealthy servers—proactive pinging versus monitoring real traffic.
The Core Difference
In the previous lesson, you learned what health checks are. Now let's explore how they work. There are two main strategies:
Active health checks work like a heartbeat monitor—the load balancer regularly sends test requests to each server (like pinging "Are you alive?") on a fixed schedule, even when no real user traffic is flowing. If a server fails to respond correctly, it's marked unhealthy and removed from rotation.
Passive health checks are more observational—the load balancer watches actual user requests as they happen. If multiple real requests to a server fail or time out, the load balancer notices the pattern and marks that server unhealthy. No separate test requests are sent.
The Trade-offs
Active checks catch problems before users are affected. Imagine a security guard who walks through the building every 10 minutes checking doors—they'll find a broken lock before anyone tries to use it. However, active checks add overhead (extra network traffic and CPU cycles on servers).
Passive checks have zero overhead since they only monitor existing traffic. But they require actual user requests to fail before detecting issues—someone must try the broken door first. They're faster to implement but slightly slower to detect problems.
Most production systems use both: active checks provide baseline monitoring, while passive checks catch issues that only appear under real traffic patterns (like a server that handles pings fine but chokes on complex queries).
Key Takeaway: Active health checks proactively test servers on a schedule; passive checks learn from real traffic failures—combining both provides robust failure detection with minimal blind spots.