If i set the min.insync.replicas
to 1, the leader will wait for a follower to fetch this record or he will send an ack to producer considering himself one of the ISR list.
If you set min.insync.replicas
to 1 it is sufficient that the leader will acknowledge the receival of data. The leader will not wait for any followers to acknowledge the data.
Maybe it is worth mentioning that the min.insync.replicas
only comes into effect when you have set your producer configuration acks
set to all
(or -1
).
The minimal allowed value for min.insync.replicas
is 1
, so even if your replication factor of the topic is set to 1 you can't get below 1.
Is the leader part of ISR list?
Yes, the leader is part of the ISR list. You can see this when calling the command line tool kafka-topics
. In the result you will notice that the same broker number will show up as "Leader" and in "ISR":
./bin/kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic test
Topic: test PartitionCount: 1 ReplicationFactor: 3
Topic: test Partition: 0 Leader: 3 Replicas: 2,3,1 Isr: 3
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