What Is Rebalancing in Kafka? (Basic)
A beginner-friendly guide to the moment a consumer group reshuffles its partitions: why it happens, what goes on behind the scenes, why it can hurt, and the simple habits that keep it calm.
Imagine a school where a pile of exam papers is divided into bundles and each bundle is given to one teacher. The plan works nicely until something changes. A new teacher arrives and wants a share. A teacher falls ill and leaves. Suddenly the old plan no longer fits, and the head teacher must call everyone together, collect the bundles, and hand them out again. For a few minutes, marking slows down while the reshuffle happens. In Apache Kafka, this reshuffle is called a rebalance. It is a normal and necessary part of life for every consumer group, but if you do not understand it, it can cause slowdowns, repeated work, and confusing behaviour. This guide explains rebalancing from the ground up, in simple words.
1The Background You Need
Rebalancing only makes sense once three ideas are clear: partitions, consumers, and groups.
Topics and partitions
Apache Kafka stores streams of events, such as orders, payments, clicks, or sensor readings. Events are grouped into named categories called topics. To make a topic big and fast, Kafka splits it into smaller logs called partitions. Each partition is an ordered, append-only list of events, and every event in it has a position number called an offset.
Consumers and consumer groups
Applications that read events are called consumers. Consumers that share the same group name form a consumer group. Kafka divides the partitions of the topic among the members of the group, so that each partition is read by exactly one member at a time. This is how a group shares the reading work and keeps events in order.
The assignment is not permanent
Which member reads which partition is called the assignment. It is a plan, and like any plan it must be updated when the situation changes. Members come and go, topics grow, and the plan must always cover every partition with exactly one owner. The act of updating the plan is the rebalance.
Think of a taxi company that assigns city zones to drivers. Each zone has exactly one driver at a time. When a driver goes home sick or a new driver joins, the dispatcher redraws the list of who covers which zone. The redrawing is the rebalance.
Rebalancing belongs to consumer groups. Producers do not rebalance, because they are free to write to any partition. Only readers that must avoid stepping on each other need a plan.
2What Is a Rebalance?
A rebalance is the process by which a consumer group redistributes topic partitions among its current members.
The simple definition
Whenever the set of members or the set of partitions changes, Kafka pauses the normal flow, gathers the group, and agrees on a new assignment. Once everyone knows their new partitions, reading continues, and each member picks up from the last saved bookmark of the partitions it now owns.
Why Kafka needs rebalancing
Fairness
Work should be shared fairly. A newcomer should get a share, and no member should be overloaded while another sits idle.
Coverage
Every partition must always have an owner. If a member disappears, its partitions must not be left unread.
Order safety
Only one member may read a partition at a time. A clear plan prevents two members from handling the same partition together.
Automatic healing
No human has to reassign work after a crash. The group repairs itself, which makes Kafka applications easy to scale and easy to run.
flowchart LR
subgraph Before["Before"]
A1["Consumer A: P0, P1, P2"]
B1["Consumer B: P3, P4, P5"]
end
subgraph After["After Consumer C joins"]
A2["Consumer A: P0, P1"]
B2["Consumer B: P3, P4"]
C2["Consumer C: P2, P5"]
end
Before --> After
Six tables in a restaurant are served by two waiters, three tables each. When a third waiter starts, the manager gives each waiter two tables. Every table still has exactly one waiter, and the workload is fair again.
3What Triggers a Rebalance
Rebalances do not happen at random. A small list of events starts every one of them.
A new consumer joins the group
You start another copy of your application, perhaps to handle a busy period. The group must share its partitions with the newcomer.
A consumer leaves the group
An application shuts down normally or is redeployed. Its partitions must go to the remaining members.
A consumer crashes or becomes unreachable
The program dies, its machine fails, or the network breaks. Kafka notices that its signals have stopped and removes it from the group.
A consumer is too slow
A member takes too long between requests for new events and is judged stuck, even if the program is still running.
The subscription changes
The group starts reading an extra topic, or a topic that matches a name pattern appears.
The number of partitions changes
Someone adds partitions to a topic. The new partitions need owners, so the plan must be redrawn.
| Trigger | Planned or Unplanned | Typical Cause |
|---|---|---|
| Member joins | Usually planned | Scaling up or deploying a new version |
| Member leaves cleanly | Planned | Scaling down or a normal shutdown |
| Member crashes | Unplanned | Program fault, machine failure, network outage |
| Member too slow | Unplanned | Long processing between requests |
| Subscription changes | Planned | New feature reads a new topic |
| Partitions added | Planned | Capacity growth of a topic |
Treating every rebalance as a sign that something is broken. Some rebalances are healthy and expected. The problem is frequent, unplanned rebalances that keep repeating.
4Who Notices? Heartbeats and the Coordinator
To start a rebalance, someone must first notice that the group has changed.
The group coordinator
For every consumer group, one Kafka server, called a broker, acts as the group coordinator. It keeps the list of active members, receives their regular signals, and decides when a rebalance must begin. The coordinator is like the manager of a team who keeps the attendance list.
Heartbeats
Each consumer sends a small signal, called a heartbeat, to the coordinator every few seconds. A heartbeat simply says “I am alive.” If the coordinator does not hear from a member for longer than the session timeout, it declares that member dead, removes it from the group, and starts a rebalance.
The processing time limit
Heartbeats alone are not enough, because a consumer could be alive yet stuck, for example waiting on a slow database. Kafka therefore also limits how long a consumer may go without asking for new events. If this limit is exceeded, the member is treated as failed and the group rebalances, even if heartbeats are still arriving.
Heartbeat interval
How often a member says “I am alive”. Shorter intervals detect trouble sooner.
Session timeout
How long the coordinator waits without a heartbeat before declaring the member dead.
Maximum processing gap
How long a member may take between requests for events before being judged stuck.
A night watchman must press a button every ten minutes to prove he is awake. That is the heartbeat. He must also finish his patrol within an hour. If he presses the button but never completes the round, the company still knows something is wrong. Kafka uses both checks together.
The heartbeat is usually sent by a separate background activity inside the consumer, so it keeps flowing even while the main code is busy processing events. The processing time limit is what catches the stuck main code.
5The Steps of a Rebalance
Let us follow a rebalance from the first signal to the moment reading resumes.
The coordinator notices a change
A new member asks to join, a member asks to leave, or heartbeats stop arriving. The coordinator decides that the group needs a new plan.
Members are told to rejoin
The coordinator tells every member, in reply to their next heartbeat, that a rebalance is under way and that they must rejoin the group.
Members stop and commit
Each member finishes what it is doing, saves its bookmark for the partitions it owns, and releases them, so nobody works on a partition that is about to change hands.
The join phase
All members send a join request. The coordinator waits until everyone has reported or the waiting time is over, then picks one member as the group leader.
The leader makes the plan
The group leader, which is just one of the consumers, receives the list of members and topics and calculates a new assignment using the chosen strategy.
The sync phase
The leader sends the plan to the coordinator, and the coordinator gives each member its own portion.
Reading resumes
Every member loads the last committed bookmarks for its new partitions and starts fetching events again.
sequenceDiagram
participant M1 as Member 1 - Group Leader
participant M2 as Member 2
participant GC as Group Coordinator
GC-->>M1: A rebalance is starting, please rejoin
GC-->>M2: A rebalance is starting, please rejoin
M1->>GC: Join group
M2->>GC: Join group
GC-->>M1: You are the leader, here are the members
GC-->>M2: Joined, waiting for your assignment
M1->>GC: Sync with the new plan
M2->>GC: Sync and wait for plan
GC-->>M1: Your partitions
GC-->>M2: Your partitions
A class teacher calls a short meeting, makes everyone put down their work, picks one student to draw up a new seating chart, gives the chart to the teacher, and the teacher announces where everyone should sit. Then class resumes.
You do not write any of these steps yourself. The Kafka client library performs them automatically. Understanding them simply helps you explain what you see in logs and dashboards.
6How the New Plan Is Drawn: Assignment Strategies
The group leader needs a rule to decide who gets which partitions. Kafka offers a few common rules.
Range
Gives each member a block of neighbouring partitions of every topic. Simple, but it can produce uneven loads when there are many topics.
Round robin
Deals partitions out one by one like playing cards, giving a very even spread.
Sticky
Keeps the spread even but tries to leave existing assignments untouched, so fewer partitions change owner.
Cooperative sticky
Combines stickiness with a gentler hand-over, so most members keep reading during the change.
Why “sticky” matters
Consumers often keep useful things in memory for the partitions they own, such as caches, running totals, or open connections. If a partition moves to another member, that member must rebuild all of it. A sticky strategy reduces these moves, so most members keep their partitions and their memory stays valuable.
When a new student joins a class, a good teacher moves as few students as possible to make room, rather than reshuffling the whole classroom. Students who are already comfortable at their desks stay where they are.
| Strategy | Evenness | Partitions That Move | Good For |
|---|---|---|---|
| Range | Can be uneven | Many | Simple, single-topic groups |
| Round robin | Very even | Many | Even spread over many topics |
| Sticky | Even | Few | Groups that keep local state |
| Cooperative sticky | Even | Few, moved gently | Large or busy groups that change often |
7Eager and Cooperative Rebalancing
Not all rebalances disturb the group equally. The style of the hand-over decides how much reading stops.
Eager rebalancing: stop the world
In the classic style, every member gives up all of its partitions at the start of the rebalance, and then everything is assigned again from scratch. While this happens, the entire group stops reading. Even members whose partitions will not change must pause. In a large group, or when rebalances repeat, these pauses add up and lag grows.
Cooperative rebalancing: only move what must move
The cooperative style is smarter. Members keep the partitions that are staying, and continue reading them without interruption. Only the partitions that need a new owner are released, and then handed over in a second, short round. Most of the group stays productive throughout. Because the change happens in two small steps, the total disruption is much smaller.
flowchart TD
subgraph Eager["Eager style"]
E1["All members release all partitions"] --> E2["Group stops reading"]
E2 --> E3["New plan is drawn"]
E3 --> E4["All members resume"]
end
subgraph Coop["Cooperative style"]
C1["Plan is drawn; find partitions that must move"] --> C2["Only those partitions are released"]
C2 --> C3["Released partitions go to new owners"]
C3 --> C4["Other members never stopped reading"]
end
| Aspect | Eager | Cooperative |
|---|---|---|
| What members give up | Everything | Only partitions that move |
| Reading during the change | Stops for the whole group | Continues for unaffected partitions |
| Number of rounds | One | Two short rounds |
| Effect on lag | Noticeable pause | Small pause |
Imagine rearranging furniture when a new person joins a shared office. The eager way is to carry out every desk into the corridor and put them all back in a new layout. The cooperative way is to move only the one or two desks that must change, while everyone else keeps working.
Newer Kafka versions also offer an improved group protocol in which the brokers take over much of the coordination work. This makes rebalances lighter, especially in very large groups. Whatever the version, the basic idea remains the same.
8Why Rebalances Can Hurt
Rebalancing keeps the group healthy, but it is not free. Here are the costs beginners should know.
Cost 1: Pauses in reading
While partitions are being reassigned, some or all members do not read. Events pile up in Kafka, and consumer lag, the gap between the newest event and the group’s bookmark, grows. Once reading resumes, the group must catch up.
Cost 2: Repeated work
A member may have processed some events but not yet saved its bookmark when the partition is taken away. The new owner starts from the last saved bookmark and reads those events again. This is why consumers must tolerate seeing an event twice.
Cost 3: Lost local state
Caches and running totals held in memory for a partition are useless to a new owner. It must rebuild them, which takes time and extra load on databases or on Kafka itself.
Cost 4: The rebalance storm
Sometimes a rebalance causes conditions that trigger another rebalance, and then another. For example, a rebalance makes members slow, which makes one exceed its time limit, which triggers a new rebalance. This chain is called a rebalance storm, and it can keep a group nearly useless for a long time.
flowchart LR
A["Rebalance starts"] --> B["Members pause and rebuild state"]
B --> C["Processing becomes slow"]
C --> D["A member exceeds its time limit"]
D --> E["Member is removed from the group"]
E --> A
Imagine a team meeting called to reorganise the tasks. During the meeting no work is done, some tasks are started twice by mistake, and people forget what they had in their heads. If the meeting overruns and people are late for the next one, another meeting must be called. Soon the whole day is meetings.
Ignoring occasional rebalances until they become a storm. Watch how often rebalances happen. A calm group rebalances only when you change it on purpose.
9Common Causes of Unwanted Rebalances
When rebalances happen too often, the cause is usually one of a few familiar culprits.
Slow processing of a batch
The consumer fetches a large batch and takes too long to process it. It exceeds the allowed gap between requests and is removed.
Slow downstream systems
A database or another service that the consumer calls becomes slow, and every batch takes longer than usual.
Long pauses inside the application
Long garbage collection pauses or overloaded machines can stall a consumer so that even heartbeats are delayed.
Unstable networks
Lost or delayed heartbeats make the coordinator believe a healthy member has died.
Rolling deployments
Restarting members one after another causes a leave and a join for each, leading to a long series of rebalances.
Timeouts set too tight
A very short session timeout treats brief hiccups as failures. A very long one delays the detection of real failures.
Automatic scaling that flaps
An auto-scaler that adds and removes consumers every few minutes forces a rebalance each time.
| Symptom | Likely Cause | First Thing to Check |
|---|---|---|
| Rebalances every few minutes, members “kicked out” | Processing exceeds the time limit | Batch size and time spent per batch |
| Rebalance during every deployment | Members restarting without stable identity | Static membership and graceful shutdown |
| Random rebalances with healthy programs | Network or machine stalls | Heartbeat timeouts and machine health |
| Group never settles | Rebalance storm | Time limits, downstream latency, and scaling rules |
10Calming Rebalances: Simple Habits
You cannot remove rebalancing, but a few simple habits make it gentle and rare.
Keep batches small and processing quick
Fetch fewer events per request if each takes a while to process. The consumer then returns for more well within the time limit.
Set sensible timeouts
Choose a session timeout long enough to forgive brief hiccups but short enough to detect real failures in reasonable time, and a processing limit that matches real work.
Use a cooperative assignment strategy
It lets most members keep reading during a change and moves as few partitions as possible.
Give members stable names
Static membership lets a restarting member return quickly and reclaim its partitions without a reshuffle.
Shut down gracefully
Let a departing member commit its progress and leave the group cleanly, so its partitions move promptly.
Deploy gently
Roll out changes one member at a time with pauses between, and avoid restarting everything at once.
Scale with restraint
Give auto-scalers a cool-down period, so they do not add and remove members every few minutes.
A well-run office avoids constant reorganisation. It gives each person a permanent desk, lets people take short breaks without losing their desks, asks departing colleagues to hand over their work properly, and adds new staff one at a time.
11Static Membership
A special feature exists to spare groups from the most avoidable rebalances: those caused by quick restarts.
The problem it solves
Normally, when a consumer restarts, Kafka sees the old member leave and a new member join. That means two rebalances for a change that lasts only a few seconds. In a large group updated one member at a time, this triggers a long chain of reshuffles.
How it works
With static membership, each consumer is given a fixed, unique name. If it disappears and returns with the same name within the session timeout, Kafka recognises it as the same member. It simply gets its previous partitions back, and the rest of the group is not disturbed. Only if the member fails to return in time does the normal rebalance begin.
Advantages
- Quick restarts cause no rebalance at all
- Rolling deployments become smooth
- Local state and caches stay with the same member
- Brief crashes are forgiven without disturbing the group
Disadvantages / Trade-offs
- A member that truly died keeps its partitions until the session timeout ends, so those partitions are unread meanwhile
- Each instance needs its own unique, stable name
- Two instances with the same name will clash
A waiter steps out for a five-minute break. The manager does not redraw the floor plan. The waiter’s tables stay reserved for a short time. If the waiter does not come back, the manager reassigns the tables.
Combining static membership with a very long session timeout without thinking. If a member really dies, its partitions sit unread for the whole timeout. Balance the two settings carefully.
12Bookmarks and Rebalancing: Committing Progress
The safety of a rebalance depends on how well members save their progress.
What is committed and what is not
As a member reads, it periodically saves its bookmark, called the committed offset, in Kafka. The bookmark says how far the group has finished. The member’s current reading position may be ahead of that saved bookmark. When a partition moves during a rebalance, the new owner starts from the committed bookmark, not from the old owner’s current position.
Two outcomes
Progress saved before the hand-over
The old owner commits just before releasing the partition. The new owner continues exactly where the old one stopped, with little or no repeated work.
Progress not saved
The old owner is removed abruptly, or fails to commit in time. The new owner restarts from an older bookmark and repeats some events.
flowchart LR
A["Old owner reads offsets 100 to 149"] --> B["Committed bookmark: offset 130"]
B --> C["Rebalance moves the partition"]
C --> D["New owner starts at offset 130"]
D --> E["Offsets 130 to 149 are read again"]
A shift worker leaves a note in a shared logbook saying where the work stopped. If the worker forgot to update the note during the last hour, the next worker starts from the older note and repeats the last hour’s tasks.
Reacting to the hand-over
Kafka lets a consumer be told just before it loses partitions and just after it receives new ones. Well-built applications use these moments. When partitions are about to be taken away, they finish their current work and commit the bookmark. When new partitions arrive, they prepare, for example by loading the state they need. This turns a rebalance from a messy interruption into an orderly hand-over.
Because of possible repeats, always design your processing so that seeing the same event twice does no harm. This one habit makes every rebalance safe.
13Monitoring Rebalances
You cannot fix what you cannot see. A few signals reveal the health of a group.
What to watch
Watch the number of rebalances over time. A calm group shows rebalances only when you deploy or scale. Watch how long each takes, because long rebalances mean long pauses. Watch consumer lag per partition, since lag that jumps and then recovers is a typical fingerprint of a rebalance. Watch the size of the group and the state of each member, such as whether the group is stable, preparing to rebalance, or waiting for members. In application logs, look for messages saying that a member was removed for exceeding its time limit, since these point straight at the cause.
| What You See | What It Usually Means |
|---|---|
| A rebalance at every deployment | Normal, but can be softened with gentle rolling and stable member names |
| Rebalances at regular intervals | Processing time limit exceeded on a schedule, or auto-scaling flapping |
| Lag spikes that recover | Pauses during rebalances followed by catching up |
| Group state stuck in preparing or waiting | A member is slow to rejoin, or too many members are changing at once |
| Same events processed twice | Bookmarks not saved before partitions moved |
Set an alert on the rebalance rate, not just on lag. A rising rebalance rate warns you of trouble minutes or hours before customers see delays.
14Advantages and Trade-offs of Rebalancing
Rebalancing is a bargain: automatic healing in exchange for occasional disruption.
Advantages
- Work is shared fairly without manual effort
- Failed members are replaced automatically
- Applications scale up and down while running
- Every partition always has exactly one reader in the group
- Order inside each partition is preserved
Disadvantages / Trade-offs
- Reading pauses while ownership changes
- Events after the last commit may be processed again
- In-memory state must be rebuilt after a partition moves
- Frequent rebalances can snowball into a storm
- Behaviour depends on client version and settings
15Anti-Patterns and Best Practices
Most rebalance problems come from the same handful of mistakes.
Problem
Processing a large batch of events with slow calls, such as long database writes, between requests for new events.
Why It’s Harmful
The consumer exceeds its allowed processing gap, is removed, and triggers a rebalance. The same events are read again, and the cycle repeats.
Correct Approach
Fetch smaller batches, speed up processing, and tune the time limit to match realistic work.
Problem
Killing consumer applications abruptly instead of shutting them down cleanly.
Why It’s Harmful
The member never commits its progress or leaves the group. The coordinator must wait for the session timeout, so partitions sit unread and more events are repeated.
Correct Approach
Handle shutdown signals, commit progress, and close the consumer so it leaves the group at once.
Problem
Restarting all members of a group at the same moment during a deployment.
Why It’s Harmful
The group loses all its members at once, everything stops, and a full rebalance happens when they return.
Correct Approach
Roll changes one member at a time, waiting until each has rejoined and become stable before starting the next.
Problem
Keeping important state only in a consumer’s memory, with no way to rebuild it.
Why It’s Harmful
Every rebalance that moves a partition destroys the state for that partition, causing wrong results.
Correct Approach
Store state in a durable place, or rebuild it from Kafka when partitions are assigned, and design consumers to tolerate moves.
Problem
Scaling consumers up and down every few minutes based on tiny changes in load.
Why It’s Harmful
Every change forces a rebalance, so the group spends much of its time reshuffling instead of reading.
Correct Approach
Use cool-down periods, scale in larger steps, and never scale beyond the number of partitions.
Best practices at a glance
Small, fast batches
Keep processing well within the allowed gap between requests.
Cooperative strategy
Let members keep reading while only the necessary partitions move.
Stable member names
Use static membership for quick, calm restarts.
Graceful shutdown
Commit progress and leave the group cleanly.
Repeat-safe processing
Make sure seeing an event twice never causes harm.
Gentle deployments
Roll changes one member at a time.
Watch the rebalance rate
Alert when rebalances become frequent, long, or repetitive.
Plan partitions ahead
Choose a partition count with room to grow so that adding partitions is rare.
16A Real-World Walk-Through
Let us watch rebalancing during a busy day at an online shop.
A calm start
The email service group has three members reading a topic with six partitions, two partitions each. Lag is near zero.
A sale begins
Traffic rises sharply, and the team starts two more members. The coordinator sees two join requests and begins a rebalance.
A gentle hand-over
Using a cooperative strategy, only a few partitions move to the newcomers. The original members keep reading the rest, so lag barely moves.
A member is overloaded
One member’s downstream database slows down, and its batch takes longer than the allowed gap. The coordinator removes it and starts another rebalance.
Recovery and repeats
The remaining members take over its partitions from the last committed bookmark. A few emails are sent twice, but receipts are designed to be repeat-safe, so no harm is done.
The team investigates
Dashboards show a rise in the rebalance rate and long processing times. The team reduces the batch size, fixes the slow query, and the rebalances stop.
Evening deployment
The next release is rolled out one member at a time with stable names. Each quick restart returns the same partitions without a reshuffle.
flowchart TD
S["Sale starts and traffic grows"] --> J["Two members join"]
J --> R1["Cooperative rebalance moves a few partitions"]
R1 --> O["One member becomes too slow"]
O --> R2["Member removed and second rebalance"]
R2 --> D["Survivors continue from committed bookmarks"]
D --> F["Team fixes slow query and reduces batch size"]
F --> C["Group is calm again"]
17Frequently Asked Questions
It is the process by which a consumer group redistributes the partitions of its topics among its current members after the group or the topic changes.
No. It is a normal, designed behaviour. It only becomes a problem when it happens too often, takes too long, or causes repeated work.
No. Producers may write to any partition. Only consumers in a group must coordinate to avoid reading the same partition at once.
One consumer in the group is chosen as the group leader and draws up the plan using the configured strategy, then sends it to the coordinator, which gives each member its share. In newer protocols, the broker performs much of this work.
No, events stay safely in Kafka. But events processed after the last committed bookmark may be read again, so consumers must tolerate repeats.
Common reasons are processing that exceeds the allowed gap between requests, members with unstable networks or machines, auto-scaling that changes the group size, or timeouts set too tight.
Eager makes every member give up all partitions and stops the whole group while a new plan is drawn. Cooperative moves only the partitions that must change owners, so the rest of the group keeps reading.
It gives each consumer a fixed name so that a quick restart is recognised as the same member returning. The member regains its partitions without any rebalance.
No. Only as many members as there are partitions can be active. The extra members sit idle, and each extra member still causes a rebalance when it joins.
Look at the group state reported by Kafka tools, at consumer log messages about revoked and assigned partitions, at a rise in consumer lag, and at the rebalance rate metrics of your monitoring system.
18Summary and Key Takeaways
We began with a school where exam-paper bundles must be handed out again whenever a teacher joins or leaves. A Kafka rebalance is that reshuffle. Whenever a consumer joins, leaves, crashes, is judged too slow, or when the subscription or partitions change, the group coordinator starts a rebalance. Members stop, save their bookmarks, rejoin, let a group leader draw a new plan, receive their partitions, and resume from the last committed offsets. Rebalancing gives automatic fairness and healing, at the price of pauses, repeated work, and lost in-memory state. Cooperative strategies, static membership, small quick batches, graceful shutdowns, gentle deployments, and repeat-safe processing keep it calm. Watch the rebalance rate as carefully as you watch lag, and your groups will heal themselves without becoming a source of surprises.
Key Takeaways
- A rebalance redistributes partitions — it happens inside a consumer group whenever members or partitions change, so every partition always has exactly one owner.
- Triggers are few and known — a member joining, leaving, crashing, running too slowly, a subscription change, or added partitions.
- The coordinator runs the show — heartbeats and a processing time limit tell it who is alive, and a group leader draws the new plan through join and sync phases.
- Eager stops everyone, cooperative moves little — prefer cooperative and sticky strategies so most members keep reading during a change.
- Rebalances have costs — reading pauses, events after the last commit are repeated, and in-memory state is lost, so design consumers to be repeat-safe and rebuildable.
- Most trouble is self-inflicted — slow batches, abrupt shutdowns, simultaneous restarts, tight timeouts, and flapping auto-scalers are the usual causes of rebalance storms.
- Calm habits work — small fast batches, sensible timeouts, static membership, graceful shutdown, gentle deployments, and alerts on the rebalance rate.