[Kafka] Summary of issues

How to deal with all the downtime Replica

When all of the ISR Replica downtime can be treated by:

  • 1. Wait for ISR according to any one Replica recovery, and it is selected from the Leader.
    Cons: waiting for a long time, lower availability (because you can not use all the cluster nodes), or all Replica ISR therefore can not be recovered or the loss of data, the Partition will never be available.

  • 2 Select the first restoration of Replica for the new Leader, regardless of whether it is in the ISR.
    Disadvantages: does not contain all have been over before Leader Commit message (because it is not before the ISR), it will cause data loss, but it increases the range of available nodes, high availability.

How Kafka ensure that data is not lost?

1.Producer: do not lose by ACK response mechanism to ensure data
2.Broker: through a multi-copy mechanism to ensure that data is not lost
3.Consumer: by recording offset to ensure that data is not lost

Ing continuously updated

Published 82 original articles · won praise 328 · views 220 000 +

Guess you like

Origin blog.csdn.net/qq_43733123/article/details/104978681