---
title: "Kafka partition assignors: range vs round-robin vs sticky"
description: "One Kafka group tries three assignors in turn: range assigns contiguous blocks, round-robin interleaves, and sticky keeps the current layout, moving nothing."
url: https://monedula.dev/kafka-simulator/scenarios/assignors-range-roundrobin-sticky/
---

# Kafka partition assignors: range vs round-robin vs sticky

Scenario 02.2.3 · Assignors: range vs round-robin vs sticky. Consumer groups · Advanced · about 3 min · Apache Kafka 4.3.

The assignor decides which member owns which partition - range blocks, round-robin interleaves, sticky minimises movement (keeps the current layout).

Run it: https://monedula.dev/kafka-simulator/playground/?scenario=02.2.3

## What you start with

The partition assignor is the strategy the group's leader consumer runs (client side, in the classic protocol) to map partitions to members. This scenario switches the assignor live on the same group to compare them - range hands out contiguous blocks, round-robin interleaves one at a time, and sticky minimises movement by keeping each member on the partitions it already owns.

## Step by step

1. **range - contiguous blocks** (t+0.000s): The group starts on the range assignor. Range sorts members and partitions, then hands each member a contiguous block: c1 owns p0-p1, c2 owns p2-p3. Adjacent partitions land on the same member. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=02.2.3&t=0)
2. **round-robin - interleaved** (t+1.400s): Switching the assignor to roundrobin re-runs the assignment (the simulator swaps it live; real consumers need a rolling restart with the new partition.assignment.strategy). Round-robin deals partitions one at a time across the sorted members, so the layout INTERLEAVES: c1 owns p0 and p2, c2 owns p1 and p3 - a different partition→member map than range for the very same group and topic. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=02.2.3&t=1)
3. **sticky - keeps the current layout (zero movement)** (t+2.900s): Switching to sticky re-runs the assignment, but sticky is seeded with each member's CURRENT ownership and minimises movement - so it KEEPS the round-robin layout it inherited: c1 still owns p0 and p2, c2 still owns p1 and p3. Zero partitions move. That is sticky's whole point (see 02.2.2 / 02.2.4): unlike range/round-robin, which lay a fixed layout from scratch, sticky moves as few partitions as possible - here, none. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=02.2.3&t=2)

## The takeaway

The assignor shapes balance and churn: range and round-robin lay a fixed layout from scratch (blocks vs interleaved), while sticky is seeded with current ownership and moves as few partitions as it can - here it retains the round-robin layout with zero reshuffling.

## Configs in this scenario

- [`partition.assignment.strategy`](https://kafka.apache.org/43/configuration/consumer-configs/#consumerconfigs_partition.assignment.strategy): The assignors a classic-protocol consumer supports, in order of preference; the default [RangeAssignor, CooperativeStickyAssignor] assigns by range, and CooperativeStickyAssignor moves only the partitions that change owner instead of revoking every partition on each rebalance.

## Further reading

- [Apache Kafka documentation](https://kafka.apache.org/43/configuration/consumer-configs/#consumerconfigs_partition.assignment.strategy)
