Example of Cruise Control goal configuration
By default, Cruise Control is configured with a set of Default, Supported, Hard, Self-healing and Anomaly detection goals in Cloudera Manager. The default configurations can be changed based on what you would like to achieve with the rebalancing.
The following example details how to configure Cruise Control to achieve the following:
- Find dead/failed brokers and create an anomaly to remove load from them
(
self.healing.broker.failure.enabled) - Move load back to the brokers when the brokers are available again
(
self.healing.goal.violation.enabledand added goals) - Prevent too frequent rebalances to reduce cluster costs (incremented thresholds, reduced
self.healing.goalsset) - Have an always balanced cluster from the replicas and leader replicas point of view
- Not enable every type of self-healing methods if it is not required (only two type of self-healing is enabled)
Configurations that need to be added to the Cruise Control Server Advanced
Configuration Snippet (Safety Valve) for cruisecontrol.properties property:
self.healing.goal.violation.enabled=trueself.healing.broker.failure.enabled=trueself.healing.exclude.recently.removed.brokers=false
Configurations that need to be set (and available explicitly among properties):
anomaly.notifier.class=com.linkedin.kafka.cruisecontrol.detector.notifier.SelfHealingNotifierreplica.count.balance.threshold=1.25leader.replica.count.balance.threshold=1.25
Goals that need to be added to Hard goals:
com.linkedin.kafka.cruisecontrol.analyzer.goals.ReplicaDistributionGoalcom.linkedin.kafka.cruisecontrol.analyzer.goals.LeaderReplicaDistributionGoal
Goals that need to be added to Self-healing goals:
com.linkedin.kafka.cruisecontrol.analyzer.goals.ReplicaDistributionGoalcom.linkedin.kafka.cruisecontrol.analyzer.goals.LeaderReplicaDistributionGoal
Goals that need to be added to Anomaly detection goals:
com.linkedin.kafka.cruisecontrol.analyzer.goals.ReplicaDistributionGoalcom.linkedin.kafka.cruisecontrol.analyzer.goals.LeaderReplicaDistributionGoal
Other configurations can remain as set by default.
