-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
common.Backoff doesn't have any form of jitter. #10172
Comments
Relates to elastic/cloud/issues/25895 |
This was referenced Jan 18, 2019
ph
added a commit
to ph/beats
that referenced
this issue
Jan 21, 2019
This PR add a new interface called backoff.Backoff, this can be used to generalize any backoff interaction. It move the current Backoff strategy under an ExpBackoff type. ExpBackoff times is the same as before on every wait we just exponentially increase the duration of the wait and sleep for that amount. EqualJitterBackoff uses an exponential increment of the duration but will take half of that value as a fixed sleep time and the other half as a jitter. This will help distribute the new request when a cluster is done instead of having all the beats trying to reconnect at once. The Redis implementations and any clients wrapped with a backoff will now use the EqualJitterBackoff, any other code will keep using the same exponential strategy. Fixes: elastic#10172
ph
added a commit
that referenced
this issue
Jan 21, 2019
…amount of time (#10177) This PR add a new interface called backoff.Backoff, this can be used to generalize any backoff interaction. It move the current Backoff strategy under an ExpBackoff type. ExpBackoff is the same as before on every wait we just exponentially increase the duration of the wait and sleep for that amount. EqualJitterBackoff uses an exponential increment of the duration but will take half of that value as fixed sleep time and the other half as a jitter. This will help distribute the new request when a cluster is done instead of having all the beats trying to reconnect at once. The Redis implementations and any clients wrapped with a backoff will now use the EqualJitterBackoff, any other code will keep using the same exponential strategy. Fixes: #10172
ph
added a commit
to ph/beats
that referenced
this issue
Jan 21, 2019
…amount of time (elastic#10177) This PR add a new interface called backoff.Backoff, this can be used to generalize any backoff interaction. It move the current Backoff strategy under an ExpBackoff type. ExpBackoff is the same as before on every wait we just exponentially increase the duration of the wait and sleep for that amount. EqualJitterBackoff uses an exponential increment of the duration but will take half of that value as fixed sleep time and the other half as a jitter. This will help distribute the new request when a cluster is done instead of having all the beats trying to reconnect at once. The Redis implementations and any clients wrapped with a backoff will now use the EqualJitterBackoff, any other code will keep using the same exponential strategy. Fixes: elastic#10172 (cherry picked from commit 4cb9bd7)
ph
added a commit
to ph/beats
that referenced
this issue
Jan 21, 2019
…amount of time (elastic#10177) This PR add a new interface called backoff.Backoff, this can be used to generalize any backoff interaction. It move the current Backoff strategy under an ExpBackoff type. ExpBackoff is the same as before on every wait we just exponentially increase the duration of the wait and sleep for that amount. EqualJitterBackoff uses an exponential increment of the duration but will take half of that value as fixed sleep time and the other half as a jitter. This will help distribute the new request when a cluster is done instead of having all the beats trying to reconnect at once. The Redis implementations and any clients wrapped with a backoff will now use the EqualJitterBackoff, any other code will keep using the same exponential strategy. Fixes: elastic#10172 (cherry picked from commit 4cb9bd7)
ph
added a commit
that referenced
this issue
Jan 23, 2019
…ad of sleeping for a fixed amount of time (#10229) Cherry-pick of PR #10177 to 6.x branch. Original message: This PR add a new interface called backoff.Backoff, this can be used to generalize any backoff interaction. It move the current Backoff strategy under an ExpBackoff type. ExpBackoff is the same as before on every wait we just exponentially increase the duration of the wait and sleep for that amount. EqualJitterBackoff uses an exponential increment of the duration but will take half of that value as fixed sleep time and the other half as a jitter. This will help distribute the new request when a cluster is done instead of having all the beats trying to reconnect at once. The Redis implementations and any clients wrapped with a backoff will now use the EqualJitterBackoff, any other code will keep using the same exponential strategy. Fixes: #10172
ph
added a commit
that referenced
this issue
Jan 23, 2019
…amount of time (#10177) (#10230) This PR add a new interface called backoff.Backoff, this can be used to generalize any backoff interaction. It move the current Backoff strategy under an ExpBackoff type. ExpBackoff is the same as before on every wait we just exponentially increase the duration of the wait and sleep for that amount. EqualJitterBackoff uses an exponential increment of the duration but will take half of that value as fixed sleep time and the other half as a jitter. This will help distribute the new request when a cluster is done instead of having all the beats trying to reconnect at once. The Redis implementations and any clients wrapped with a backoff will now use the EqualJitterBackoff, any other code will keep using the same exponential strategy. Fixes: #10172 (cherry picked from commit 4cb9bd7)
DStape
pushed a commit
to DStape/beats
that referenced
this issue
Aug 20, 2019
…amount of time (elastic#10177) This PR add a new interface called backoff.Backoff, this can be used to generalize any backoff interaction. It move the current Backoff strategy under an ExpBackoff type. ExpBackoff is the same as before on every wait we just exponentially increase the duration of the wait and sleep for that amount. EqualJitterBackoff uses an exponential increment of the duration but will take half of that value as fixed sleep time and the other half as a jitter. This will help distribute the new request when a cluster is done instead of having all the beats trying to reconnect at once. The Redis implementations and any clients wrapped with a backoff will now use the EqualJitterBackoff, any other code will keep using the same exponential strategy. Fixes: elastic#10172
DStape
pushed a commit
to DStape/beats
that referenced
this issue
Aug 20, 2019
…r instead of sleeping for a fixed amount of time (elastic#10229) Cherry-pick of PR elastic#10177 to 6.x branch. Original message: This PR add a new interface called backoff.Backoff, this can be used to generalize any backoff interaction. It move the current Backoff strategy under an ExpBackoff type. ExpBackoff is the same as before on every wait we just exponentially increase the duration of the wait and sleep for that amount. EqualJitterBackoff uses an exponential increment of the duration but will take half of that value as fixed sleep time and the other half as a jitter. This will help distribute the new request when a cluster is done instead of having all the beats trying to reconnect at once. The Redis implementations and any clients wrapped with a backoff will now use the EqualJitterBackoff, any other code will keep using the same exponential strategy. Fixes: elastic#10172
leweafan
pushed a commit
to leweafan/beats
that referenced
this issue
Apr 28, 2023
…amount of time (elastic#10177) (elastic#10230) This PR add a new interface called backoff.Backoff, this can be used to generalize any backoff interaction. It move the current Backoff strategy under an ExpBackoff type. ExpBackoff is the same as before on every wait we just exponentially increase the duration of the wait and sleep for that amount. EqualJitterBackoff uses an exponential increment of the duration but will take half of that value as fixed sleep time and the other half as a jitter. This will help distribute the new request when a cluster is done instead of having all the beats trying to reconnect at once. The Redis implementations and any clients wrapped with a backoff will now use the EqualJitterBackoff, any other code will keep using the same exponential strategy. Fixes: elastic#10172 (cherry picked from commit 7e68306)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current implementation of the common.Backoff only sleep for a period of time, since an error can affect multiple beats at the same time and multiple retries can greatly affect the performance remote endpoints or even kill them in some circumstances it is necessary to add some jitter in the backoff strategy to help distribute the requests.
The text was updated successfully, but these errors were encountered: