CodePark/ questions / Kafka: producers, acks & durability
START PRACTICINGPRACTICE
Backend question · Message queues & streaming › Kafka: producers, acks & durability

A topic has replication factor 3 and min.insync.replicas=2. Producers use acks=all. Two of the three replicas' brokers go down. What happens?

Producers get not-enough-replicas errors and writes fail, while consumers can still read already committed data

Producers get not-enough-replicas errors, but consumers can still read. Only one in-sync replica is left, so the leader cannot meet min.insync.replicas=2. Kafka rejects acks=all writes instead of accepting them with a single copy. This trades write availability for durability: no new writes, but no data with only one copy.

"Writes succeed on the leader alone and are copied when the brokers return" is wrong, because that would break the
min.insync.replicas=2 promise.

"Writes and reads both stop until a broker returns" is wrong, because the leader still serves reads of committed data.


"Kafka automatically lowers
min.insync.replicas to 1 to stay available" is wrong, because Kafka never changes this setting on its own.