Skip to content
StackDecode
System Design
8. Load Balancing and ScalabilityAnimated

Round Robin

Send each request to the next server in turn.

The idea

The simplest algorithm. Works when requests and servers are similar.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

10.0.0.4Load balancerServer 10 totalServer 21 totalServer 30 total
  • chosen path
  • active connections (bar)

Request 1 goes to server 2: next server in the rotation.

request:
1
server:
2
1/14

The white bar inside each server is its current number of active connections.

Step by step

  1. 1Keep a pointer to the next server
  2. 2Send the request there
  3. 3Advance the pointer
  4. 4Wrap around

Where it is used

Uniform workloads.

Watch out for

Ignores server load and request cost.

Related