How Load Balancers Distribute Traffic
- Networking Fundamentals & OSI Model
- TCP/IP Model
- Network Topologies
- IP Addressing & Subnetting
- Routing Algorithms & Protocols
- Switching Concepts
- Transport Layer Protocols (TCP & UDP)
- Application Layer Protocols
- Network Security & Firewalls
- Wireless Networking & Wi-Fi
- Network Address Translation (NAT)
- DNS Deep Dive
- Congestion Control & Flow Control
- Error Detection & Correction
- Network Devices
- VPN & Tunneling
- Load Balancing & CDN Networking
- Socket Programming
- Network Troubleshooting Tools
- Physical Layer & Transmission Media
- Data Link Layer & MAC Addressing
- Ethernet Protocol
- ARP (Address Resolution Protocol)
- ICMP Protocol
- Unicast, Multicast, Broadcast and Anycast
- Proxy Servers
- Port Numbers Reference
- Network Performance Metrics
- Quality of Service (QoS)
- Software-Defined Networking (SDN)
- HTTP/2 and HTTP/3 Overview
- 5G and Mobile Networks
- IoT Networking Basics
- VoIP Networking Basics
The Problem: One Server Isn't Enough
A popular website receiving far more traffic than a single server can handle needs a way to spread that traffic across multiple servers. A load balancer sits in front of a group of servers and decides which one should handle each incoming request.
[ Load Balancer ]
/ | \
Server A Server B Server C
(each handles a share of the total traffic)Health Checks: Avoiding a Failed Server
A load balancer continuously checks whether each backend server is actually healthy and responding correctly. If a server fails a health check, the load balancer automatically stops sending it new traffic, redirecting requests to the remaining healthy servers instead - without any human needing to intervene.
Why This Directly Improves Reliability
Without a load balancer, a single failed server means the entire service goes down for every user. With one in place, a single server failure just means slightly reduced total capacity - the service as a whole stays up, since traffic simply routes around the failed machine.
Why This Also Enables Easy Scaling
Adding more capacity becomes as simple as adding another server behind the load balancer - it automatically starts receiving a share of new traffic once it passes its health checks, without requiring any change to how users actually access the service.
Where Load Balancers Typically Operate
Load balancers can operate at different layers - some make decisions purely based on IP address and port (Layer 4), while others can inspect actual application-level content like URLs or headers to make smarter routing decisions (Layer 7), similar in spirit to the layered awareness difference covered for firewalls earlier in this section.