From kafka documentation
When a producer sets acks to "all" (or "-1"), this min.insync.replica configuration specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful.
It says when the minimum number of in-sync replicas acknowledge, the write is successful but when i run performance test with min.insync.replica
as 1 and 3 (for a topic of partition=1 and R.F=5 in 5 broker setup), the performance of kafka producer, with acks='all'
, is same.
So, Does min.insync.replica
per-topic configuration affects Kafka producer throughput (ran in isolation) with acks="all"
?
If you use acks='all'
, the leader waits until in-sync replicas get the message before sending back an acknowledgment or an error, so the performance is affected. In case of min.insync.replica=1
, the producer gets a response back once the message is written to the leader. It should be faster than using min.insync.replica=3
as in this case the producer waits for 2 replicas to get all the messages before it can consider the message as committed.
Your results mean that the latency between your brokers is very low. I believe you should see the difference if you start the brokers in different datacenters/regions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With