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

Max backoff for exponential backoffs #16

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

Conversation

macobo
Copy link

@macobo macobo commented Feb 12, 2016

Exponential backoffs are great for reducing load. However, problem with exponents is that they get large really fast - e.g. if your task fails 15 times you might end up waiting 9 hours instead 1 second between retries. After a certain point it doesn't really make sense anymore.

This PR adds a new optional maxDelay argument to backoff policy - if provided and not infinite, it will only increase delays up to that given argument.

EDIT: Not sure why tests fail, but a stack overflow does not happen locally. Given that travis has iterated in the past months, I'm assuming a bug there?

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.

None yet

1 participant