liveBook · Manning

Load balancing

As explained in Grokking Concurrency

Load balance is the degree to which computational work is distributed evenly across available workers or processing resources.

Load balancing distributes computational work across workers so no worker is left with an inefficient share. When task workloads vary, choosing how to group and assign tasks can be difficult; heuristics can help find efficient groupings and mappings. section 7.9 section 13.13

Think of task scheduling as conducting an orchestra: a scheduler coordinates workers by assigning tasks, tracking progress, and collecting results. A central scheduler can give tasks to idle workers, but task allocation is a compromise between keeping work independent to reduce communication and using global knowledge to improve load balance. section 13.13

Dynamic allocation is useful when the number and sizes of files are unknown in advance, so an optimal assignment cannot be guaranteed before work begins. Its efficiency depends on the number of workers and the costs of receiving and completing tasks. section 13.13

How Grokking Concurrency covers it

How deep it goes
Explains heuristic grouping and mapping, then describes central dynamic scheduling; it notes that optimal allocation cannot always be guaranteed in advance.
Examples
Uses a central scheduler that assigns map and reduce tasks to workers processing files of unknown number and size.
What you can do after
Understand how a central scheduler assigns tasks and why dynamic allocation may help when workloads are unknown.
How it connects
Connects load balancing to task decomposition, agglomeration, mapping, and task scheduling.

Also explained in

Compare how 14 books explain load balancing →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Concurrency. The section links point to the parts of the book it draws on.