Load Balancing Algorithms (Round Robin, Least Connections)
- 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
Round Robin: Simple, Even Rotation
Request 1 -> Server A
Request 2 -> Server B
Request 3 -> Server C
Request 4 -> Server A (cycle repeats)Round robin simply cycles through the list of available servers in order, sending each new request to the next one in turn. It's simple to implement and works well when every server has roughly equal capacity and every request takes roughly similar effort to handle.
Least Connections: Accounting for Current Load
Round robin has a blind spot: it doesn't know if a server is currently bogged down handling a few very heavy, slow requests. Least connections instead sends each new request to whichever server currently has the fewest active connections - a better fit when requests vary significantly in how long they take to process.
Server A: 12 active connections
Server B: 4 active connections <- new request goes here
Server C: 9 active connectionsWeighted Variants: Accounting for Unequal Servers
Both algorithms have "weighted" versions, useful when servers have genuinely different capacities. A more powerful server can be assigned a higher weight, causing it to receive a proportionally larger share of traffic than a smaller, less powerful one.
Choosing the Right Algorithm
| Algorithm | Best suited when |
|---|---|
| Round robin | Servers are equal, requests are roughly uniform in cost |
| Least connections | Request processing time varies significantly |
| Weighted variants | Servers have meaningfully different capacities |