Add a new goal to distribute topic leaders fairly#2267
Add a new goal to distribute topic leaders fairly#2267hmit wants to merge 2 commits intolinkedin:mainfrom
Conversation
…ers across brokers * add config for TopicLeaderDistributionGoal * create kaas map and build clustermodel from it * use generous default, modify values in the test * more changes, add tests which generate a html report for visual inspection * plot per broker distribution instead of table, add all replica info (leader + follower), use RackAwareDistributionGoal * try leadership movement as well, add more clusters
for candidate brokers, use total leader_cnt as 1st level tie-breaker and only then use broker id introduce unit-tests for topic leaders replicas goal
|
Today Cruise Control already have LeaderReplicaDistributionGoal, which I think would achieve the similar thing with the new goal that you are proposed. That said I have a few questions:
|
|
@CCisGG, thanks for taking a look at this! Please find my responses inline:
To mitigate the adverse effect of this goal for keyed or compacted topics, we added this goal as a hard goal but not recommend adding it to the default list of hard goals. This allows operations on such kafka clusters to proceed as normal. |
Summary
This PR adds a new goal to distribute Leaders Replica for every topic in a fair manner across all the brokers. If the partition count is not a multiple of brokers, some brokers do end up with extra partitions.
The thresholds can be configured using 3 new knobs added to
AnalyzerConfig.The new goal is modeled after existing
TopicReplicaDistributionGoalwith following differences:Categorization