conduktor.io ↗

min.insync.replicas — Kafka Broker Configuration

When a producer sets acks to "all" (or "-1"), this configuration specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception (either NotEnoughReplicas or NotEnoughReplicasAfterAppend).

Description

When a producer sets acks to "all" (or "-1"), this configuration specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception (either NotEnoughReplicas or NotEnoughReplicasAfterAppend).When used together, min.insync.replicas and acks allow you to enforce greater durability guarantees. A typical scenario would be to create a topic with a replication factor of 3, set min.insync.replicas to 2, and produce with acks of "all". This will ensure that the producer raises an exception if a majority of replicas do not receive a write.

Default Values by Kafka Version

Kafka VersionDefault Value
0.9.01
0.10.01
0.10.11
0.10.21
0.11.01
1.01
1.11
2.01
2.11
2.21
2.31
2.41
2.51
2.61
2.71
2.81
3.01
3.11
3.21
3.31
3.41
3.51
3.61
3.71
3.81
3.91
4.01
4.11
4.21

Tuning Recommendation

ProfileRecommendedWhy
broker / durability2With default.replication.factor=3 and min.insync.replicas=2, a ProduceRequest with acks=all is acknowledged only after 2 out of 3 replicas confirm the write. This guarantees that even if 1 broker fails immediately after the ack, the data is safe on the remaining 2.

Related Configs

acks · replica.lag.time.max.ms · default.replication.factor · unclean.leader.election.enable · offsets.topic.replication.factor · auto.create.topics.enable

Manage Kafka configs across all your clusters with Conduktor Console — view, compare, and update configurations in one place.