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

[SDK-2689] Automatically retry requests when API returns a 429 rate-limit status header. #290

Merged
merged 1 commit into from
Aug 6, 2021

Conversation

davidpatrick
Copy link
Contributor

Changes

This PR enables support for automatic retry of API requests that encounter a 429 rate-limit status response from the Auth0 API. It will retry, by default, up to 3 times, with a hard-coded cap of 10. It exponentially increases the delay between each request ("exponential backoff"), and uses a jitter technique to slightly randomize the variance of this delay.

References

Please see the internal SDK-2653 epic on this topic.

Testing

Coverage added ✅
existing tests also ✅

@davidpatrick davidpatrick requested a review from a team as a code owner August 5, 2021 23:42
Copy link
Member

@evansims evansims left a comment

Choose a reason for hiding this comment

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

Awesome work! LGTM 👍

@davidpatrick davidpatrick merged commit d095c0b into master Aug 6, 2021
@davidpatrick davidpatrick deleted the auto_retry branch August 6, 2021 18:45
@davidpatrick davidpatrick mentioned this pull request Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants