Oh My Algorithm
Concept GuideLeader/Follower · ISR

Replication & ISR

Each partition has one leader and several followers, and the leader alone handles reads and writes. Followers copy the leader's log, and the set of replicas that have kept up is called the ISR. When the leader dies a new one is elected from the ISR, so being in the ISR is exactly what makes a replica safe to promote.

01 Concept at a Glance

Interactive Step-by-Step
Replication & ISR · when the leader dies
Broker 1 · leaderwritten through offset 5
Broker 2 · followeroffset 5 — caught up
Broker 3 · followeroffset 5 — caught up
followers keep pulling the leader's log
ISR = caught-up replicas { broker 1, 2, 3 }

One partition is replicated across three brokers. Only one of them is the leader; the rest are followers.

Logic Node1 / 11

02 Understand It Simply

For Everyone
🔑Analogy

Like keeping one master ledger and a few hand-copied duplicates. You only ever write in the master; the copies transcribe it. If the master is lost, only a copy that kept up is fit to become the new master.

💡In Plain Words

Writes always go to the leader.

Followers keep pulling the leader's log and appending it to their own, and the ones that haven't fallen behind stay in the ISR.

Leader elections draw only from the ISR, so a shrinking ISR means fewer failures you can absorb.

acks=all is the setting that waits on that same ISR — replication and durability are two sides of one design.

📍Where It's Used
  • Setting replication factor and min.insync.replicas
  • calculating how many broker failures you can survive
  • and reading ISR-shrink alerts correctly

03 Frequently Asked Questions

FAQ
What is Replication & ISR?+

Each partition has one leader and several followers, and the leader alone handles reads and writes. Followers copy the leader's log, and the set of replicas that have kept up is called the ISR. When the leader dies a new one is elected from the ISR, so being in the ISR is exactly what makes a replica safe to promote.

Where is Replication & ISR used?+

Setting replication factor and min.insync.replicas, calculating how many broker failures you can survive, and reading ISR-shrink alerts correctly.

What's a simple analogy for Replication & ISR?+

Like keeping one master ledger and a few hand-copied duplicates. You only ever write in the master; the copies transcribe it. If the master is lost, only a copy that kept up is fit to become the new master.

Guide Progress0%