CONCEPT Cited by 1 source
In-sync replica set (ISR)¶
Definition¶
For each Kafka partition, the in-sync replica set (ISR) is the subset of the partition's replicas that are caught up with the leader's log. Replicas outside the ISR are considered out-of-sync — they do not have the latest data for the partition. The leader is always a member of the ISR (by definition).
Why ISR matters — durability depends on it¶
The ISR is what producer acks are computed against.
Kozlovski's Kafka-101 framing:
"Every partition has a set of replicas (called the 'replica set'). A replica can be in two states — in-sync or out-of-sync. As the name suggests, out-of-sync replicas are ones that don't have the latest data for the partition." (Source: sources/2024-05-09-highscalability-kafka-101)
For a producer writing with acks=all:
- The leader waits until all in-sync replicas persist the record before acknowledging.
- If the ISR shrinks (a follower falls behind), the effective
durability guarantee silently weakens — in the degenerate case
where only the leader is in-sync,
acks=allcollapses toacks=1.
The min.insync.replicas configuration prevents this collapse:
"To further control the acks=all property and ensure it doesn't regress to an acks=1 property when there is only one in-sync replica, the
min.insync.replicassetting exists to denote the minimum number of in-sync replicas required to acknowledge a write that's configured withacks=all." (Source: sources/2024-05-09-highscalability-kafka-101)
If the ISR drops below min.insync.replicas, the leader rejects
acks=all writes rather than silently delivering weaker durability
— a fail-closed posture on durability.
ISR membership — state transitions¶
Replicas transition in and out of the ISR based on replication lag:
- A follower that falls behind the leader by more than a configured amount (time or offset) is evicted from the ISR (becomes out-of-sync).
- A follower that catches up rejoins the ISR.
- Leader election only considers ISR members — an out-of-sync replica cannot become leader (Kafka's default posture; modes for unclean-leader-election exist as an availability-over- durability trade-off).
Seen in¶
- sources/2024-05-09-highscalability-kafka-101 — canonical
wiki definition of ISR, its role in
acks=alldurability semantics, andmin.insync.replicasas the fail-closed-on-ISR-shrink dial.
Related¶
- systems/kafka
- concepts/kafka-partition — the unit the ISR is scoped to.
- concepts/leader-follower-replication — the replication shape ISR tracks.
- concepts/acks-producer-durability — the producer-side durability dial ISR computations back.
- patterns/leader-based-partition-replication — the pattern ISR participates in.