Let the Kafka producer is configured with acks=all
and there are 5 broker replicas with min.insync.replica=2
configuration.
I understand that if 3 brokers go offline, but 2 brokers are still up and healthy, then the producer will still get the message acknowledgement and will be able to continue sending the messages.
But what happens if all 5 brokers are up and healthy:
I am interesting in the throughput in the case when all broker replicas are healthy: will the throughput with min.insync.replica=2
will be higher then with min.insync.replica=5
(for acks=all
and 5 broker replicas)?
Producer will get the acknowledgement the moment data in written to min.insync.replicas
that is 2 in this case. It will not wait for all brokers to get the message.
And yes, the throughput will definitely be higher when min.insync.replica=2
That is the tradeoff kafka is trying to give the user. If throughput is critical for you, keep min.insync.replica
lower, but if reliability is more critical to you keep min.insync.replica
higher.