-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(refactor): updates the cruise control rebalance concepts #10810
base: main
Are you sure you want to change the base?
docs(refactor): updates the cruise control rebalance concepts #10810
Conversation
Signed-off-by: prmellor <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @PaulRMellor, thanks. I must say that our CC doc is quite good :)
I left some comments for your consideration.
documentation/assemblies/cruise-control/assembly-cruise-control-concepts.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/assemblies/cruise-control/assembly-cruise-control-concepts.adoc
Outdated
Show resolved
Hide resolved
documentation/assemblies/cruise-control/assembly-cruise-control-concepts.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
Signed-off-by: prmellor <[email protected]>
Signed-off-by: prmellor <[email protected]>
Thanks for the reviews @fvaleri and @kyguy |
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
Signed-off-by: prmellor <[email protected]>
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
Some main goals are preset as hard goals. | ||
|
||
To simplify configuration, use the inherited main goals unless you need to exclude specific goals from `KafkaRebalance` resources. | ||
You can adjust the priority order in the default optimization goals configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it's just my luck of knowledge here, can we really change the priority order? @kyguy ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To my understanding, this is true for the Kafka resource default.goal
and KafkaRebalance goals
lists but not for Kafka goals
list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. So I think we should clarify here (and everywhere goals priority is mentioned) that the priority is based on the order. Not sure if "priority order" is used for this purpose but it's not clear to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to admit that CC naming doesn't help much here.
IMO, this is the default inter-broker goals priority list:
To change it, the user can configure Kafka default.goals
or KafkaRebalance goals
with a different order. Kafka goals
priority is irrelevant, but only goals listed there can be used in the previous configurations (DEFAULT_DEFAULT_GOALS is a subset of DEFAULT_GOALS).
- Do you agree?
- Are we exposing Kafka
goals
because we intend to eventually support custom goals?
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
Signed-off-by: prmellor <[email protected]>
Signed-off-by: prmellor <[email protected]>
Signed-off-by: prmellor <[email protected]>
Thanks for the latest comments @kyguy and @ppatierno |
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
Signed-off-by: prmellor <[email protected]>
Signed-off-by: prmellor <[email protected]>
Thanks for the latest @kyguy and @ppatierno |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
documentation/modules/cruise-control/con-cruise-control-overview.adoc
Outdated
Show resolved
Hide resolved
Thanks for latest comments @kyguy Regarding the summary of Cruise Control components. Previously, we mentioned some but not all them without any context. I thought it would be useful at least to mention them all in summary and show how they operate within a Strimzi context, how requests are made and proposals generated etc. I think the diagram is useful (and good for SEO and user experience). |
Signed-off-by: prmellor <[email protected]>
|
||
* *Default goals* refer to the goals used by default when generating proposals. | ||
They match the supported goals unless specifically set by the user. | ||
* *Proposal-specific goals* are a subset of default goals configured for specific proposals. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* *Proposal-specific goals* are a subset of default goals configured for specific proposals. | |
* *Proposal-specific goals* are a subset of supported goals configured for specific proposals. |
=== Default goals | ||
|
||
Cruise Control uses default goals to generate an optimization proposal. | ||
You can override default goals by setting proposal-specific optimization goals in a `KafkaRebalance` resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move this sentence/information to the Proposal-specific goals
section, saying that if proposal-specific goals are not set in the KafkaRebalance
resource then default goals are used
Optimization proposals comprise a list of partition reassignment mappings. | ||
When you approve a proposal, the Cruise Control server applies these partition reassignments to the Kafka cluster. | ||
|
||
A partition reassignment command consists of either of the following types of operations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A partition reassignment command consists of either of the following types of operations: | |
A partition reassignment consists of either of the following types of operations: |
|
||
* Leadership movement: Involves switching the leader of the partition's replicas. | ||
|
||
Cruise Control issues partition reassignment commands to the Kafka cluster in batches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cruise Control issues partition reassignment commands to the Kafka cluster in batches. | |
Cruise Control issues partition reassignments to the Kafka cluster in batches. |
* Leadership movement: Involves switching the leader of the partition's replicas. | ||
|
||
Cruise Control issues partition reassignment commands to the Kafka cluster in batches. | ||
The performance of the cluster during the rebalance is affected by the number of each type of movement contained in each batch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The performance of the cluster during the rebalance is affected by the number of each type of movement contained in each batch. | |
The performance of the cluster during the rebalance is affected by the number and magnitude of each type of movement contained in each batch. |
The score is calculated by subtracting the sum of the `BalancednessScore` of each violated soft goal from 100. Cruise Control assigns a `BalancednessScore` to every optimization goal based on several factors, including priority--the goal's position in the list of `default.goals` or proposal-specific goals. | ||
|
||
The `Before` score is based on the current configuration of the Kafka cluster. | ||
The `After` score is based on the generated optimization proposal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `After` score is based on the generated optimization proposal. | |
The `After` score is based on the predicted workload model after applying the generated optimization proposal. |
Broker load data provides insights into current and anticipated usage of resources following a rebalance. | ||
The data is stored in a `ConfigMap` (with the same name as the `KafkaRebalance` resource) as a JSON formatted string | ||
|
||
When a Kafka rebalance proposal reaches the `ProposalReady` state, Cruise Control generates a `ConfigMap` (named after the `KafkaRebalance` custom resource) containing a JSON string of broker metrics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a Kafka rebalance proposal reaches the `ProposalReady` state, Cruise Control generates a `ConfigMap` (named after the `KafkaRebalance` custom resource) containing a JSON string of broker metrics. | |
When a Kafka rebalance proposal reaches the `ProposalReady` state, Strimzi creates a `ConfigMap` (named after the `KafkaRebalance` custom resource) containing a JSON string of broker metrics generated from Cruise Control. |
|
||
Cluster rebalance performance is also influenced by the _replica movement strategy_ that is applied to the batches of partition reassignment commands. | ||
By default, Cruise Control uses the `BaseReplicaMovementStrategy`, which simply applies the commands in the order they were generated. | ||
However, if there are some very large partition reassignments early in the proposal, this strategy can slow down the application of the other reassignments. | ||
By default, Cruise Control uses the `BaseReplicaMovementStrategy`, which applies the commands in the order they were generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Movements or reassignments might be better here
By default, Cruise Control uses the `BaseReplicaMovementStrategy`, which applies the commands in the order they were generated. | |
By default, Cruise Control uses the `BaseReplicaMovementStrategy`, which applies the reassignments in the order they were generated. |
By default, Cruise Control uses the `BaseReplicaMovementStrategy`, which simply applies the commands in the order they were generated. | ||
However, if there are some very large partition reassignments early in the proposal, this strategy can slow down the application of the other reassignments. | ||
By default, Cruise Control uses the `BaseReplicaMovementStrategy`, which applies the commands in the order they were generated. | ||
However, if large partition reassignments are handled early, this strategy may delay other reassignments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, if large partition reassignments are handled early, this strategy may delay other reassignments. | |
However, this strategy could lead to the delay of other partition reassignments if some large partition reassignments are generated then ordered first. |
|
||
The relevant configurations are summarized in the following table. | ||
* Set Cruise Control server configurations in `Kafka.spec.cruiseControl.config` in the `Kafka` resource. | ||
* Set individual rebalances in `KafkaRebalance.spec` in the `KafkaRebalance` resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Set individual rebalances in `KafkaRebalance.spec` in the `KafkaRebalance` resource. | |
* Set proposal-specific configurations in `KafkaRebalance.spec` in the `KafkaRebalance` resource. |
Documentation
Refactor and refresh of Cruise Control concepts
Checklist
Please go through this checklist and make sure all applicable tasks have been done