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

runtime: add jitter utils and options #613

Merged
merged 4 commits into from
Aug 2, 2023
Merged

runtime: add jitter utils and options #613

merged 4 commits into from
Aug 2, 2023

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Aug 1, 2023

This adds a jitter package to runtime to allow the configuration of a random +/-% jitter to the interval at which resources are requeued.

Applying jitter to the interval duration can be useful to mitigate spikes in memory and CPU usage caused by many resources being configured with the same interval.

@hiddeco hiddeco added enhancement New feature or request area/runtime Controller runtime related issues and pull requests labels Aug 1, 2023
@hiddeco hiddeco force-pushed the jitter branch 3 times, most recently from 6669897 to f5fc36a Compare August 1, 2023 13:37
@hiddeco hiddeco requested a review from aryan9600 as a code owner August 1, 2023 13:37
@hiddeco hiddeco force-pushed the jitter branch 3 times, most recently from fb27f78 to 86f35fd Compare August 1, 2023 13:42
@hiddeco hiddeco removed the request for review from aryan9600 August 1, 2023 13:42
This adds a `jitter` package to runtime to allow the configuration of a
random +/-% jitter to the interval at which resources are requeued.

Applying jitter to the interval duration can be useful to mitigate
spikes in memory and CPU usage caused by many resources being
configured with the same interval.

Signed-off-by: Hidde Beydals <[email protected]>
Copy link
Member

@stefanprodan stefanprodan 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 @hiddeco 🏅

runtime/jitter/interval_test.go Outdated Show resolved Hide resolved
runtime/jitter/interval.go Outdated Show resolved Hide resolved
runtime/jitter/jitter.go Show resolved Hide resolved
runtime/jitter/interval.go Outdated Show resolved Hide resolved
runtime/jitter/jitter.go Outdated Show resolved Hide resolved
runtime/jitter/interval.go Outdated Show resolved Hide resolved
Copy link
Member

@aryan9600 aryan9600 left a comment

Choose a reason for hiding this comment

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

lgtm! 💯

Copy link
Contributor

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

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

LGTM!

@hiddeco hiddeco merged commit 33880da into main Aug 2, 2023
@hiddeco hiddeco deleted the jitter branch August 2, 2023 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runtime Controller runtime related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants