-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add min available bytes storage policy #33
Conversation
1015bdd
to
603645b
Compare
…age. Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Sam Barker <sbarker@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Signed-off-by: Sam Barker <sbarker@redhat.com>
Wire up quota reset listener. Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
c12b894
to
4abf66e
Compare
Looks like some spotbugs issues failed the build. |
Signed-off-by: Sam Barker <sbarker@redhat.com>
… throttled state. This stops spotbugs complaining about floating point equality. Signed-off-by: Sam Barker <sbarker@redhat.com>
Signed-off-by: Sam Barker <sbarker@redhat.com>
Signed-off-by: Sam Barker <sbarker@redhat.com>
7e0a3d4
to
dfc12ab
Compare
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
We can re-introduce filterable log dirs later. Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
e67af7f
to
533c78f
Compare
@tombentley: @robobario and I think we have addressed all your feedback hopefully the changes work for you. (cc: @scholzj if you are still planning to look at the java code) |
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 few more nits, but assuming you're happy to fix those this LGTM. Thanks!
src/main/java/io/strimzi/kafka/quotas/AvailableBytesThrottleFactorPolicy.java
Show resolved
Hide resolved
src/main/java/io/strimzi/kafka/quotas/TotalConsumedThrottleFactorPolicy.java
Outdated
Show resolved
Hide resolved
src/test/java/io/strimzi/kafka/quotas/AvailableBytesThrottleFactorPolicyTest.java
Show resolved
Hide resolved
src/test/java/io/strimzi/kafka/quotas/AvailableBytesThrottleFactorPolicyTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
Co-authored-by: Robert Young <robeyoun@redhat.com> Signed-off-by: Sam Barker <sbarker@redhat.com>
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 I guess ... assuming it works :-D
@ppatierno @strimzi/maintainers Anyone has anything else to this? |
Why: We will want visibility when the throttle factor changes as it could effectively stop messages being produced (and make recovery visible too) Co-authored-by: Sam Barker <sbarker@redhat.com> Signed-off-by: Robert Young <robeyoun@redhat.com>
Why: Acting on the total usage of the cluster makes no sense now that we are using KIP-827 to determine the usage of all volumes in the active broker set. Nodes will enter/exit the active set as a matter of course. So the aggregate usage will fluctuate. Instead we will limit based on the usage of each volume going forward. IE throttle if any of the volumes is getting too full. See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](strimzi#33)
Why: Acting on the total usage of the cluster makes no sense now that we are using KIP-827 to determine the usage of all volumes in the active broker set. Nodes will enter/exit the active set as a matter of course. So the aggregate usage will fluctuate. Instead we will limit based on the usage of each volume going forward. IE throttle if any of the volumes is getting too full. See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](strimzi#33)
Why: Acting on the total usage of the cluster makes no sense now that we are using KIP-827 to determine the usage of all volumes in the active broker set. Nodes will enter/exit the active set as a matter of course. So the aggregate usage will fluctuate. Instead we will limit based on the usage of each volume going forward. IE throttle if any of the volumes is getting too full. See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](strimzi#33)
Why: It may be convenient to be able to throttle message production when any volume's usage ratio drops below a threshold. This means you could have a single configuration for heterogeneous disks saying cease all message production if any volume's available ratio is below 0.01 See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](strimzi#33) Signed-off-by: Robert Young <robeyoun@redhat.com>
Why: It may be convenient to be able to throttle message production when any volume's usage ratio drops below a threshold. This means you could have a single configuration for heterogeneous disks saying cease all message production if any volume's available ratio is below 0.01 See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](strimzi#33) Signed-off-by: Robert Young <robeyoun@redhat.com>
Why: Acting on the total usage of the cluster makes no sense now that we are using KIP-827 to determine the usage of all volumes in the active broker set. Nodes will enter/exit the active set as a matter of course. So the aggregate usage will fluctuate. Instead we will limit based on the usage of each volume going forward. IE throttle if any of the volumes is getting too full. See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](strimzi#33) Signed-off-by: Robert Young <robeyoun@redhat.com>
Why: It may be convenient to be able to throttle message production when any volume's usage ratio drops below a threshold. This means you could have a single configuration for heterogeneous disks saying cease all message production if any volume's available ratio is below 0.01 See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](strimzi#33) Signed-off-by: Robert Young <robeyoun@redhat.com>
Why: It may be convenient to be able to throttle message production when any volume's usage ratio drops below a threshold. This means you could have a single configuration for heterogeneous disks saying cease all message production if any volume's available ratio is below 0.01 See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](strimzi#33) Signed-off-by: Robert Young <robeyoun@redhat.com>
Enables users to throttle the produce quota when the availableRatio (availableBytes/totalBytes) is less than or equal to a threshold. The new configuration property is: `client.quota.callback.static.storage.per.volume.limit.min.available.ratio` Which accepts a double between 0 and 1 inclusive Why: It may be convenient to be able to throttle message production when any volume's usage ratio drops below a threshold. This means you could have a single configuration for heterogeneous disks saying cease all message production if any volume's available ratio is below 0.01 See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](strimzi#33) Signed-off-by: Robert Young <robeyoun@redhat.com> refactor: extract a base class for policies applied to any volume Signed-off-by: Robert Young <robeyoun@redhat.com>
Enables users to throttle the produce quota when the availableRatio (availableBytes/totalBytes) is less than or equal to a threshold. The new configuration property is: `client.quota.callback.static.storage.per.volume.limit.min.available.ratio` Which accepts a double between 0 and 1 inclusive Why: It may be convenient to be able to throttle message production when any volume's usage ratio drops below a threshold. This means you could have a single configuration for heterogeneous disks saying cease all message production if any volume's available ratio is below 0.01 See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](strimzi#33) Signed-off-by: Robert Young <robeyoun@redhat.com> refactor: extract a base class for policies applied to any volume Signed-off-by: Robert Young <robeyoun@redhat.com>
* Remove deprecated total disk usage soft/hard limit types Why: Acting on the total usage of the cluster makes no sense now that we are using KIP-827 to determine the usage of all volumes in the active broker set. Nodes will enter/exit the active set as a matter of course. So the aggregate usage will fluctuate. Instead we will limit based on the usage of each volume going forward. IE throttle if any of the volumes is getting too full. See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](#33) Signed-off-by: Robert Young <robeyoun@redhat.com> * Remove Strimzi Usage documentation Why: It's unknown precisely how Strimzi will integrate with the new version, and the docs could be confusing as they contradict the warning about it not being included in Strimzi yet Signed-off-by: Robert Young <robeyoun@redhat.com> --------- Signed-off-by: Robert Young <robeyoun@redhat.com>
Enables users to throttle the produce quota when the availableRatio (availableBytes/totalBytes) is less than or equal to a threshold. The new configuration property is: `client.quota.callback.static.storage.per.volume.limit.min.available.ratio` Which accepts a double between 0 and 1 inclusive Why: It may be convenient to be able to throttle message production when any volume's usage ratio drops below a threshold. This means you could have a single configuration for heterogeneous disks saying cease all message production if any volume's available ratio is below 0.01 See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](strimzi#33) Signed-off-by: Robert Young <robeyoun@redhat.com> refactor: extract a base class for policies applied to any volume Signed-off-by: Robert Young <robeyoun@redhat.com>
Enables users to throttle the produce quota when the availableRatio (availableBytes/totalBytes) is less than or equal to a threshold. The new configuration property is: `client.quota.callback.static.storage.per.volume.limit.min.available.ratio` Which accepts a double between 0 and 1 inclusive Why: It may be convenient to be able to throttle message production when any volume's usage ratio drops below a threshold. This means you could have a single configuration for heterogeneous disks saying cease all message production if any volume's available ratio is below 0.01 See Also: * https://github.com/strimzi/proposals/blob/main/047-cluster-wide-volume-usage-quota-management.md * [Add min available bytes storage policy](#33) refactor: extract a base class for policies applied to any volume Signed-off-by: Robert Young <robeyoun@redhat.com>
First step in implementing proposal #47.
This PR adds the first of the new limit types "min available bytes" and adds the requirement to specify the bootstrap URL for communicating with the Kafka cluster. It also removes the old storage checker, but preserves the old total consumed space soft and hard limits (as an incremental step we plan to remove them eventually) as well as their metrics.
We propose to add additional metrics and other limit types in separate pull requests.