Round Robin Algorithm
What you'll learn: How the simplest load balancing algorithm distributes requests equally across servers in a repeating cycle.
The Core Idea
Round Robin is the most straightforward load balancing algorithm. It works like dealing cards: you have a list of servers, and each incoming request goes to the next server in line. When you reach the last server, you circle back to the first and start over.
Imagine you're a teacher handing out worksheets to three students sitting in a row. You give the first worksheet to Student 1, the second to Student 2, the third to Student 3, then back to Student 1 for the fourth worksheet, and so on. Every student gets an equal number of worksheets over time.
How It Works
The load balancer maintains an ordered list of available servers. With each new request:
- Send the request to the current server
- Move the pointer to the next server in the list
- When reaching the end, wrap around to the beginning
This creates a circular pattern: Server A → Server B → Server C → Server A → Server B → ...
When It Works Well
Round Robin shines when:
- All servers have similar capacity (same hardware, resources)
- Requests require roughly equal processing time
- You want simple, predictable behavior
Limitations
Round Robin doesn't consider current server load. If Server A is struggling with a heavy request while Server B is idle, Round Robin still sends the next request to Server B regardless. It also assumes all servers are equally capable—problematic in heterogeneous environments.
Key Takeaway: Round Robin distributes requests equally across servers in sequential order—simple and fair, but blind to actual server capacity and current load.