Skip to content
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 available ratio limit type #36

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

robobario
Copy link

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:

@scholzj scholzj added this to the 0.3.0 milestone Mar 1, 2023
Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

Copy link
Member

@tombentley tombentley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits, but otherwise LGTM. Thanks!

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>
@robobario robobario force-pushed the add-available-ratio-limit-type branch from 1768bbd to c1ee697 Compare March 1, 2023 21:06
@robobario
Copy link
Author

Sorry, things got a little messy with DCO since I merged master in and then committed without signoff, wasn't confident in rebasing the merge commit so I folded it all into the first commit. The only changes were addressing the review comments.

Copy link

@mimaison mimaison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@scholzj scholzj merged commit 3260111 into strimzi:main Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants