Load balancing lab
Send random arrivals to servers that run at different speeds, and watch queues, tail latency and throughput react to the strategy you pick.
ρ = λ / Σμ= 6.68 / 7.86 = 0.85requests per t, t = mean service time
Random
- p50 latency
- 2.5t
- p95 latency
- 12.2t
- p99 latency
- 13.8t
- throughput
- 5.50/t
| Series | Latest | Lowest | Highest |
|---|---|---|---|
| Random | 13.8 | 1.3 | 13.8 |
| Strategy | p50 | p95 | p99 | Throughput | Queue depths |
|---|---|---|---|---|---|
| Random | 2.5 | 12.2 | 13.8 | 5.50 | 0 2 18 25 13 11 0 2 |
What to try
Each one sets up a starting point. Then make the change it describes.
Random against power of two
Keep the arrival rate at 0.85, pick Compare all strategies, and let it run. Compare the p99 line for Random and Power of two choices.
Look for. Random lets some servers pile up while others sit idle. Asking two servers and taking the shorter queue keeps the worst queue much shorter.
Same strategies, light load
Drop the arrival rate to 0.40 in compare mode.
Look for. The gap between strategies narrows. Queues are short whatever you pick, so the choice matters most when servers are busy.
Make every server identical
Set Server speed spread to 0 and compare Round robin with Random.
Look for. With equal servers round robin spreads arrivals evenly, which beats Random, most clearly in the median. Then raise the speed spread to 0.30 and watch round robin and Random both fall behind, because neither looks at the queues.
Turn up the variance
Pick Power of two choices and raise Service-time variance from 0 to 3.
Look for. A few very slow requests block whatever is queued behind them, so the tail grows even though the average cost is unchanged.
Push past capacity
Set the arrival rate to 1.10 with Least connections.
Look for. Throughput stops rising at the capacity line and the queues grow without bound. No strategy can serve work the servers cannot do.
New to the idea? Read the lesson first. Every number here comes from a seeded simulator, so the same seed gives the same run.
Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms