IT lexicon › Programming › Load balancing

Load balancing

Programming På svenska → Updated: 2026-11-16

A technique to distribute computation evenly across available processors or threads to maximize throughput and minimize idle time.

If a thread pool has 8 workers and one gets a long-running job while others sit idle, the system is underutilized. Load balancing fixes this via dynamic work distribution: workers pull fresh tasks from a central queue (work queue) or steal tasks from other queues (work stealing). Work stealing gives lower latency and is popular in modern frameworks like Rust's Rayon.

Tradeoff: more balancing reduces idle time but adds overhead to the division and queue operations. The best balance depends on task size and duration.

← Back to the lexicon