Suppose I have a cluster with 3 kafka brokers. I set:
min.insync.replicas=2
default.replication.factor=3
All brokers are up, ISR is fine, I get a message where ack=all
. Since ISR=2
, two copies of the message are for sure stored. 1) Will one more copy (because replication=3) be made in the background? 2) If it fails - it does not matter, correct? Cluster health is just fine.
One broker is down, ISR=2
can be maintained and the message is saved to two brokers. After some time that broker that was down comes up again. 3) Since replication=3, will it try to catch up with the others in the back-ground?
I am trying to figure out of a practical example where setting replication factor to be bigger than ISR would make sense. A real example I could "touch" and understand. If this is a duplicate, please refer me to it. Thank you.
Yes, one replica is made in the background.
Yes, the broker will catch up all out of sync replicas upon restarts.
If you ever have in-sync replicas <= replication factor, then you cannot lose any brokers more than the difference between the values (due to maintenance or failure). Therefore, replication factor should always be greater
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