Load Balancing
In plain English
Plain definition
Load balancing distributes incoming traffic across multiple servers or resources so that no single resource is overwhelmed, improving availability, responsiveness and fault tolerance.
Technical Definition
A load balancer sits in, or is logically inserted into, the traffic path between clients and a pool of backend resources. It distributes requests according to a selection algorithm – such as round robin, weighted round robin, least connections or consistent hashing – and uses health checks to detect and exclude backends that are failed or degraded. Load balancing may operate at Layer 4 (transport level, using IP address and port information) or Layer 7 (application level, using HTTP headers, paths or cookies), with Layer 7 offering finer routing control at greater processing cost.
Operational Relevance
- Enables horizontal scaling by allowing additional backend instances to absorb increased demand.
- Supports high availability by routing traffic away from unhealthy or unreachable instances.
- Allows connection draining during rolling deployments, reducing disruption when instances are replaced.
- Provides a natural point to observe request distribution, error rates and backend health for operational monitoring.
Architecture Relationship
Load balancing is a foundational layer in distributed system architecture. It commonly appears alongside reverse proxies (which may perform load balancing as one of several functions), service meshes (where sidecar proxies balance traffic between services), DNS-based global traffic steering (directing clients to a regional or provider endpoint), and container orchestration platforms, where an internal load-balancing construct distributes traffic across replica pods or instances. It typically works in cooperation with health-check and auto-scaling subsystems rather than as an isolated component.
Example
Consider a web application served by three backend instances behind a load balancer configured with round-robin distribution and periodic active health checks. Under normal operation, requests are spread evenly across the three instances. If one instance fails its health check, the load balancer removes it from the active rotation until it passes health checks again, so client traffic continues to be served by the remaining healthy instances without manual intervention.
Common Misunderstanding
- Load balancing is sometimes conflated with simple failover or redundancy. Failover typically activates a standby resource only after a primary fails; load balancing actively distributes live traffic across multiple healthy resources at all times.
- Layer 4 and Layer 7 load balancing are sometimes treated as interchangeable. They are not: Layer 4 balancing decisions are made using transport-level information alone, while Layer 7 balancing can inspect application content, enabling more precise routing but requiring more processing per request.
Related Terms
- Reverse proxy
- High availability
- Horizontal scaling
- Health check
- DNS
- TCP/IP
- Service mesh
Further Reading
Load balancing operates on top of foundational Internet protocols such as TCP and DNS. Readers seeking authoritative protocol-level detail should consult the RFC Editor, the recognised publication channel for Internet technical specifications and standards, rather than relying on vendor marketing material for protocol behaviour. This entry does not cite specific RFC numbers because no specific standards document was verified for this assignment; readers requiring exact standards citations should confirm them directly against the RFC Series.