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

feat(transports): add retries to HTTP transport #715

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

Conversation

iskorotkov
Copy link

Changes:

  • added retries on 429 status code (that use value from Retry-After header)
  • added retries on 429|500+ status codes (that use exponential backoff)
  • unified tests and added tests for new functionality

Reasoning:

  • in my application I execute requests in parallel, which leads to lots of 429s due to rate limiting. My PR enables automatic retries on rate limits (429) and server errors (500+) for HTTP transport

I'm looking for feedback. Current implementation is simple and straightforward, but it is able to solve problems that I encountered. I can try to implement similar mechanism for WS transport if this PR gets approved and merged.

@iskorotkov iskorotkov marked this pull request as draft January 9, 2024 16:59
@iskorotkov iskorotkov marked this pull request as ready for review January 10, 2024 17:38
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