System Design
8. Load Balancing and Scalability17. Observability and MonitoringAnimated
Health Checks
Regularly testing whether servers are working.
The idea
The balancer probes each server and stops sending traffic to failed ones.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- chosen path
- active connections (bar)
Request 1 goes to server 2: next server in the rotation.
- request:
- 1
- server:
- 2
1/14
The white bar inside each server is its current number of active connections.
Step by step
- 1Probe each server
- 2Mark failures after several misses
- 3Remove from rotation
- 4Add back when healthy
Where it is used
Every load balancer.
Watch out for
A shallow check can pass while the app is broken.