Getting started with kafka, Leader Partition load balancing (15)

Leader Partition automatic balance

insert image description here
Under normal circumstances, Kafka itself will automatically distribute the Leader Partition evenly on each machine to ensure that the read and write throughput of each machine is even. However, if some brokers are down, the Leader Partition will be too concentrated in the On a small number of other brokers, this time the reading and writing pressure of a few brokers is too high. After restarting the other brokers that are down, they are all follower partitions, and the read and write requests are very low, resulting in unbalanced cluster load.

parameter describe
auto.leader.rebalance.enable The default is true, automatic leader Partition balance, in the production environment, the leader re-election Hood standby is relatively large, which may affect performance, it is recommended to set it to false
leader.imbalance.per.broker.percentage The default is 10%, the ratio of unbalanced leader allowed by each broker, if each broker exceeds this value, the controller will trigger the leader's balance
leader.imbalance.check.interval.seconds The default is 300 seconds, the interval for checking whether the leader load is balanced

Guess you like

Origin blog.csdn.net/weixin_43205308/article/details/131489740