What is a Load Balancer?

A load balancer spreads incoming requests across several healthy instances of the same service.

Beginner 4 min Architecture
Architecture · load balancing
  • Request traffic
  • Health checks
  • Out of rotation
SERVICE POOL — INTERCHANGEABLE INSTANCES3/4 IN ROTATIONMobile appGET /ordersBrowserGET /Partner APIPOST /eventsBrowserGET /searchNO TRAFFICPUBLIC ENTRY POINTshop.example.comLoad balancerDistributes each requestROTATION3 healthyHealth checksControl path — every instance, every few secondsInstance AHealthy · in rotation200 OKInstance BHealthy · in rotation200 OKInstance CFailing health checkTIMEOUTInstance DHealthy · in rotation200 OKAdd another instanceHorizontal scaling — same entry point, more capacity
One public entry point in front of interchangeable instances. Health checks decide who is in rotation; a failing instance stops receiving traffic while the probe keeps trying.

Hover a node to isolate its paths; click a client, the load balancer, an instance or the health checks for a short explanation.

Next conceptClient-Server ArchitectureClients request, servers respond, and state lives behind the server rather than on the device.