Monedula

Kafka topic config

min.insync.replicas: the floor for acks=all writes

Topic config · default 1 · Apache Kafka 4.3

min.insync.replicas is the fewest in-sync replicas, leader included, that must have a write for an acks=all produce to succeed (default 1). When the ISR is smaller, the leader rejects acks=all writes with NOT_ENOUGH_REPLICAS. It has no effect on acks=0 or acks=1 producers, or on consumers.

Config
min.insync.replicas (topic)
Default
1
Valid values
1 or more
Also set at
Also a broker setting, min.insync.replicas, which is the default for topics that do not set it.
Reference
Apache Kafka documentation for min.insync.replicas
O3 blocked - NotEnoughReplicas. acks=all needs 2 in-sync replicas; only 1 remains. Open this step in the full playground

What it does

An acks=all producer waits until every replica in the ISR has the record. On its own, that could mean only the leader if the followers have fallen out of the ISR. min.insync.replicas puts a floor under it: with the ISR below the floor, the leader refuses the write instead of accepting a record that would live on too few brokers. The error is retriable, so the producer keeps retrying until the ISR recovers or delivery.timeout.ms runs out.

The trade-off

A higher value means every acknowledged record is on more brokers, but fewer brokers can be down before acks=all producers stop. With replication.factor=3, min.insync.replicas=2 tolerates one broker down for writes and guarantees two copies; 3 would block writes during any broker restart; 1 keeps writing with a single copy, so losing that broker loses data.

Advice

See it in the simulator

Related configs

All Kafka configs