Monedula

Scenario 03.1.2 · min.ISR boundary

min.insync.replicas with acks=all: when Kafka refuses writes

Replication · Beginner · about 1 min · Apache Kafka 4.3

acks=all commits at ISR == min.insync.replicas, then fails one replica below.

Run this scenario in the playground

O3 blocked - NotEnoughReplicas. t+13.200s

acks=all needs 2 in-sync replicas; only 1 remains.

Open at this step: step 6, O3 blocked - NotEnoughReplicas

What you start with

With acks=all, a write only commits when at least min.insync.replicas copies are in-sync. Starting from a 3-replica partition with min.ISR=2, brokers are failed one at a time so the ISR crosses that boundary while a producer keeps writing.

Step by step

  1. Cluster ready - RF=3, min.ISR=2 t+0.000s Open at this step: step 1, Cluster ready - RF=3, min.ISR=2
  2. O1 committed with full ISR (3) t+3.050s Open at this step: step 2, O1 committed with full ISR (3)
  3. broker-3 down - ISR shrinks to 2 t+6.050s ISR is now exactly min.insync.replicas. Open at this step: step 3, broker-3 down - ISR shrinks to 2
  4. O2 still commits at the boundary (ISR == 2) t+8.200s Open at this step: step 4, O2 still commits at the boundary (ISR == 2)
  5. broker-2 down - ISR shrinks to 1 t+11.050s ISR is now below min.insync.replicas. Open at this step: step 5, broker-2 down - ISR shrinks to 1
  6. O3 blocked - NotEnoughReplicas t+13.200s acks=all needs 2 in-sync replicas; only 1 remains. Open at this step: step 6, O3 blocked - NotEnoughReplicas

The takeaway

Once the ISR falls below min.insync.replicas the leader rejects acks=all writes with NOT_ENOUGH_REPLICAS - min.ISR trades availability for the guarantee that every acked record sits on at least that many replicas.

Configs in this scenario

Embed this scenario

Paste this into a blog post, a course page or your team's docs. The scenario plays inside your page, and the link under it points readers to this walkthrough.

<iframe src="https://monedula.dev/kafka-simulator/embed/?scenario=03.1.2" title="Kafka Simulator: min.ISR boundary" width="100%" height="520" style="border:1px solid #d0d0d0;border-radius:8px" loading="lazy"></iframe>
<p><a href="https://monedula.dev/kafka-simulator/scenarios/min-isr-boundary/">min.insync.replicas with acks=all: when Kafka refuses writes</a></p>

Further reading

Apache Kafka documentation

Troubleshooting

More in Replication

All scenarios