Health checks let the load balancer detect when backend servers fail. The balancer periodically probes each server and removes unhealthy ones from rotation.
Active health checks:
- TCP connect: Can I open a connection?
- HTTP request: Does /health return ?
- Custom script: Does the database respond?
Passive health checks monitor real traffic. If a server returns consecutive errors, mark it unhealthy.
Configure check intervals (every seconds), thresholds (fail after bad checks), and recovery requirements (pass checks to rejoin).