Skip to content

jitter: Make jitter range to current_delay instead of min_delay#184

Merged
Xuanwo merged 1 commit intoXuanwo:mainfrom
DanielShaulov:fix-jitter-max
Mar 19, 2025
Merged

jitter: Make jitter range to current_delay instead of min_delay#184
Xuanwo merged 1 commit intoXuanwo:mainfrom
DanielShaulov:fix-jitter-max

Conversation

@DanielShaulov
Copy link
Copy Markdown
Contributor

Currently in exponential and fibonacci the jitter adds a value between 0 and min_delay, which might be very small when compared to the end of the max_delay. So when reaching max_delay, and when many different endpoints use the backoff algorithm, they will hit the backends in waves

This changes it to range from 0 to current_delay, so the jitter is always a relevant size compared to the delays.

If you prefer this to be a different parameter, let me know an I will adjust.

Currently in exponential and fibonacci the jitter adds a value between 0
and min_delay, which might be very small when compared to the end of the
max_delay. So when reaching max_delay, and when many different
endpoints use the backoff algorithm, they will hit the backends in waves

This changes it to range from 0 to current_delay, so the jitter is
always a relevant size compared to the delays.
Copy link
Copy Markdown
Owner

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thank you @DanielShaulov, this change makes sense to me.

I find it difficult to add another configuration to adjust the jitter settings, so it's best to keep the current PR changes as they are.

@Xuanwo Xuanwo merged commit 85ff0b1 into Xuanwo:main Mar 19, 2025
7 checks passed
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.

2 participants