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 exponential backoff w/ decorrelated jitter. #59

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

charlescbeebe
Copy link

@charlescbeebe charlescbeebe commented Aug 1, 2016

It's the fastest algorithm from the AWS Architecture Blog post
"Exponential Backoff and Jitter".

Closes #58.

It's the fastest algorithm from the AWS Architecture Blog post
["Exponential Backoff and
Jitter"](https://www.awsarchitectureblog.com/2015/03/backoff.html).

Closes rholder#58.
Stop using self.assertRaises as a context manager.
@charlescbeebe
Copy link
Author

@rholder added support for exponential backoff w/ decorrelated jitter. Please let me know what you think!

@@ -197,6 +222,21 @@ def exponential_sleep(self, previous_attempt_number, delay_since_first_attempt_m
result = 0
return result

def exponential_sleep_with_decorrelated_jitter(self, previous_attempt_number, delay_since_first_attempt_ms):
Copy link
Contributor

Choose a reason for hiding this comment

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

@charlescbeebe would be good if instead of a commented block here it was a docstring enclosed in """s.

@RyPeck
Copy link
Contributor

RyPeck commented Aug 1, 2016

Looks good to me.

@charlescbeebe
Copy link
Author

@RyPeck fixed!

@rholder what do you think?

@dmwyatt
Copy link

dmwyatt commented May 15, 2017

@rholder Whats going on with this?

@morrissimo
Copy link

morrissimo commented Aug 18, 2017

Whats going on with this?

Ditto - would also like to see this merged; would make use of it today!

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