Skip to content
Kafka Is Fun

Replication & Durability

Leaders, ISR, High Watermark, LEO — the full replication protocol explained.

0 of 5 lessons complete

  1. 1Leader Election ProtocolUnder normal conditions each partition has a single leader and zero or more followers. All writes go to the leader. Read…
  2. 2ISR: In-Sync ReplicasThe ISR is the set of replicas the leader considers caught up. If a follower has not sent fetch requests, or has not con…
  3. 3High Watermark (HWM) & LEOThe log end offset (LEO) is the offset of the next message that will be appended to a replica's log. The high watermark …
  4. 4Preferred Leader ElectionEach partition has a preferred replica: the first one in its replica list (for a list of 1,5,9, node 1 is preferred). Wh…
  5. 5Replica Recovery ProcessWhen a failed broker restarts, it is a follower, and it first truncates any divergent entries in its log. It does this w…

Knowledge check

Q1.What is the High Watermark?

Q2.When is a follower removed from the ISR?

Q3.What happens when a broker restarts after failure?