← Back to examples

Static vs Dynamic Load Balancing

Eight tasks with uneven cost (short and long bars), four workers. Static hands each worker a fixed block of two tasks up front. Dynamic puts every task in a shared queue and lets each worker grab the next one the moment it's free. Both run on the same clock — watch which one keeps everyone busy.

Task costs: (short = cheap, long = expensive)

Static 0.0s

Pre-assigned: 2 tasks per worker, in order

Dynamic 0.0s

Shared queue: grab the next task when free
Press Run both to compare. Same 8 tasks, same 4 workers — only the assignment strategy differs.

Why dynamic wins: with static, one worker draws the expensive tasks and everyone else finishes early and sits idle (the empty space on their tracks). Dynamic self-corrects — fast workers keep grabbing more work, so nobody is idle and the whole job finishes sooner. Nobody had to predict which tasks were slow; the queue figured it out. This is exactly a job queue feeding an autoscaling worker pool.