Skip to content
StackDecode
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.

10.0.0.4Load balancerServer 10 totalServer 21 totalServer 30 total
  • 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

  1. 1Probe each server
  2. 2Mark failures after several misses
  3. 3Remove from rotation
  4. 4Add back when healthy

Where it is used

Every load balancer.

Watch out for

A shallow check can pass while the app is broken.

Related