liveBook · Manning

Round-robin load balancing

Round-robin load balancing distributes successive requests or work items among available destinations in a repeating cyclic order.

How 3 Manning books explain it

Apache Kafka in Action

Round-robin distribution assigns successive records or work items to available partitions or recipients in cyclic order.

How it is used
Distributes Kafka messages without keys across topic partitions to spread producer traffic and, when partitions are balanced, broker load.
How deep it goes
Explains cyclic placement and Kafka 2.4's batch-level optimization, but does not specify a detailed partitioner algorithm.
Examples
Uses a two-partition price-update topic, console-producer commands, and consumer output that differs from production order.
What you can do after
Operate/configure it by omitting producer keys when per-product ordering is unnecessary, and choose keys when that ordering matters.

Read how Apache Kafka in Action explains round-robin load balancing →

Build and Orchestrator in Go (From Scratch)

A round-robin scheduler selects machines in a repeating circular order rather than ranking them by a calculated score.

How it is used
Distributes manager-submitted tasks across workers through a repeating circular selection order.
How deep it goes
Implements selection state and wraparound in nine lines, while stopping short of capacity scoring or sophisticated scheduling.
Examples
Uses a Go manager with three localhost workers, incremented ports, submitted tasks, and observed worker selection.
What you can do after
Build it from scratch by storing a worker index and implementing advancing, resetting, and returning the selected worker.

Read how Build and Orchestrator in Go (From Scratch) explains round-robin load balancing →

Kafka for Architects

A round-robin approach assigns successive items cyclically across available destinations to distribute work evenly.

How it is used
Distributes Kafka producer messages evenly across partitions when sequencing is less important than balanced workload and processing parallelism.
How deep it goes
Defines cyclical assignment and its ordering trade-off, but stops short of a low-level implementation walkthrough.
Examples
Uses cyclical assignment across partitions and identifies the RoundRobinPartitioner configuration class.
What you can do after
Apply it via Kafka producer partitioner configuration when even distribution outweighs per-key ordering.

Read how Kafka for Architects explains round-robin load balancing →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.