Beginner · INTERACTIVE LESSON

Round-robin load balancing

Choose sequential or concurrent traffic and watch round-robin routing, active requests and server queues.

The interactive player is loading. If it does not appear, you can still read the explanation below.

THE IDEA BEHIND THE STEPS

How it works

Round robin sends successive requests to available servers in circular order. Try all servers available, one unavailable, or none available. Each server shows how many requests it has handled. The balancer tracks where the next turn begins.

This simulation knows server availability before routing and skips unavailable servers. When none are available, it rejects the request. Actual products have different failure policies. Health-check delays, retries and recovery are outside this lesson.

Choose one request at a time for the detailed walkthrough, or concurrent traffic to let requests overlap. Concurrent mode can show 1–3 clients. Request count is the total across all clients, assigned in client order. Each client sends its next request at the configured arrival interval, so clients may send simultaneously. Request labels identify the client and request, and responses return to their original client. Each server has one worker and a FIFO queue. Arrival interval and processing times use simulated seconds. Every network hop takes one simulated second. A single processing duration applies to all servers; a comma-separated list can model a slower server.

At each tick, due work finishes before newly arrived requests enter queues. Queued requests then start on idle servers. Round robin does not check queue length, so a slow server can accumulate work while another server is idle. There is no queue capacity limit in this model. Equal request counts do not guarantee equal CPU usage or response time. Real systems must consider request cost, capacity, connections, session affinity and load-balancer redundancy.

Arrow movement illustrates request direction, not latency. Increasing playback speed changes only the animation.