Try
↑ ↓ move↵ openesc close

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
p99 latency over time
p99 latency over time. Text version available below the chart.0.05.010.015.020.0t=2t=16t=30simulated time (t)p99 (t)

What to try

Each one sets up a starting point. Then make the change it describes.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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