-
-
Notifications
You must be signed in to change notification settings - Fork 973
Closed
Labels
enhancementThis change will extend Got featuresThis change will extend Got featuresgood for beginnerThis issue is easy to fixThis issue is easy to fix✭ help wanted ✭
Description
What problem are you trying to solve?
Currently there is no upper limit on the backoff, meaning it grows exponentially if you want many retries which is not something you might want.
Describe the feature
So I would add a new optional parameter to the retry object called backoffLimit that would be a number of milliseconds to wait maximum between retries. This would basically do a Math.min between the default calculated backoff value and this parameter value. This would allow a user to put a limit of say 10 and have the following behaviour:
| Retry | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|
| Time | 2s | 4s | 8s | 16s | 32s | 60s | 60s | 60s | 60s | 60s |
Checklist
- I have read the documentation and made sure this feature doesn't already exist.
Metadata
Metadata
Assignees
Labels
enhancementThis change will extend Got featuresThis change will extend Got featuresgood for beginnerThis issue is easy to fixThis issue is easy to fix✭ help wanted ✭