Skip to content
Kafka Is FunProgress

IntermediateInternals

What is Kafka's inter-broker replication protocol?

Reference answer

Followers replicate by sending FetchRequests to the leader (same API consumers use, but internal). The leader responds with batches up to replica.fetch.max.bytes. Followers maintain their own LEO. The leader tracks each follower's LEO to determine ISR membership and advance HWM. Replication happens on each follower's fetch thread. The leader considers a follower in-sync if it's fetching within replica.lag.time.max.ms. Replication uses the same log reading path as consumer fetches, benefiting from zero-copy and page cache.

Expected key concepts: FetchRequests, leader, follower LEO, HWM, replica.fetch.max.bytes, replica.lag.time.max.ms, ISR, zero-copy, page cache, replication factor