Skip to content

Max backoff for exponential backoffs #16

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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?

@macobo macobo force-pushed the karl-maxdelay-backoff branch from 789d440 to c52e586 Compare February 12, 2016 09:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant