Kafka · Core Concepts

What is ISR (In-Sync Replicas)?

Mediumisrreplicationdurabilityacksmin.insync.replicas

Interview question

What is the ISR set in Kafka, and why does it matter for durability?

How to answer

The short answer

ISR means In-Sync Replicas: the set of replicas for a that are caught up (or nearly caught up) with the leader.

What "in sync" means

A follower is in the ISR if it has replicated recent data within configured lag bounds (related to replica.lag.time.max.ms and similar settings). Chronically slow or stuck followers drop out of the ISR.

Why ISR matters

  • Leader election: Kafka prefers electing a new leader from the ISR, so you do not promote a stale replica and lose acknowledged messages.
  • acks=all: a produce is considered committed only when all ISR members have the record (not necessarily every configured replica if some are out of sync).
  • min.insync.replicas: minimum ISR size required for acks=all writes to succeed. Example: RF=3 and min ISR=2 means you still require two in-sync copies.
  • If ISR shrinks below min ISR, producers with acks=all get errors until ISR recovers.

Durability story

Interview tip: "ISR = replicas that are caught up. Leader elections and acks=all durability are defined against the ISR."