Load balancer
Definition
A load balancer receives client traffic and distributes it across a pool of backend servers according to an algorithm, removing unhealthy servers from rotation.
In practice
Load balancers make horizontal scaling possible: add a server to the pool and it starts taking traffic. Layer 4 balancers route TCP or UDP connections by address and port; layer 7 balancers understand HTTP and can route by path, header or cookie.
The algorithm matters when requests differ in cost: round robin is fine for uniform work, least connections adapts to slow requests, and consistent hashing keeps a key on the same server. Health checks decide how fast a dead server stops receiving traffic.
Example
An application load balancer in front of four instances sends each new request to the instance with the fewest open connections and stops routing to an instance after three failed health checks.