linkedin / cruise-control

Cruise-control is the first of its kind to fully automate the dynamic workload rebalance and self-healing of a Kafka cluster. It provides great value to Kafka users by simplifying the operation of Kafka clusters.
https://github.com/linkedin/cruise-control/tags
BSD 2-Clause "Simplified" License
2.77k stars 595 forks source link

Questions Regarding PreferredLeaderElectionGoal #2185

Closed wetcod closed 3 months ago

wetcod commented 3 months ago

Hello, I am currently considering introducing CC within my team. However, I have a question regarding the PreferredLeaderElectionGoal.

  1. Why is the /rebalance with PreferredLeaderElectionGoal continuously called every 5 minutes?

    image
  2. What is the difference between auto.leader.rebalance.enable and the PreferredLeaderElectionGoal? I believe that Kafka itself performs preferred leader rebalancing through auto.leader.rebalance.enable, but I am curious why CC handles it separately.

Thank you.

dberardo-com commented 3 months ago

i am new to cruise control and dont know if this is the right place to ask for this, but is the PreferredLeaderElectionGoal also usable for the use case i have?

one my kafka brokers is slower than the others (hardware differences), and i would like to keep it in the cluster only for high availability purposes. to achieve this i would like this broker to never become a partition leader, so i might have to rebuild replicas so that the order of the replica changes and the specific broker is always the last in the preferred leader list.

can cruise control be used for that ?


UPDATE: i believe the "demote broker" operation is to achieve exactly my goal: https://blog.cloudera.com/operating-apache-kafka-with-cruise-control/ i believe i have issues finding this material in the wiki, is there a page in there where i can fidn details on this operation?

is also possible to demote a broker permanently (i.e. making it so that kafka never prefers this broker in new partitions)? is this a per-topic o a per-broker configuration?

mhratson commented 3 months ago

Why is the /rebalance with PreferredLeaderElectionGoal continuously called every 5 minutes?

Is this cruise-control UI? Can you check the CC logs and see the source?

What is the difference between auto.leader.rebalance.enable and the PreferredLeaderElectionGoal?

They serve similar purpose. But if you're using CC then relying on kafka to balance cluster may interfere with CC, thus the separate goal i think.