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

Improve retry policy for requests #84

Open
tobiaskamenicky opened this issue Sep 25, 2019 · 0 comments
Open

Improve retry policy for requests #84

tobiaskamenicky opened this issue Sep 25, 2019 · 0 comments
Labels
enhancement groomed The issue has been groomed and should be in a good shape. hacktoberfest https://hacktoberfest.digitalocean.com/ up-for-grabs

Comments

@tobiaskamenicky
Copy link

tobiaskamenicky commented Sep 25, 2019

Motivation

From February 1st, 2020 Delivery API will start enforcing rate limits to ensure fair usage by as many clients as possible. These rate limits should be high enough to work for most clients by default. However, in particular cases Delivery API might respond with 429 Too many requests. These responses will also contain the Retry-After header indicating how long the client should wait before making a follow-up request.

Proposed solution

Implement a retry policy that handles 429 Too many requests and retries the HTTP call using information from an optional Retry-After header. It can contain a date after which to retry or the seconds to delay after the response is received. We recommend a retry policy with exponential backoff and a jitter strategy to overcome peaks of similar retries coming from many clients. The retry policy should handle the following status codes:

  • 408 Request Timeout
  • 429 Too many requests
  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable
  • 504 Gateway Timeout

Please note that both 429 Too many requests and 503 Service Unavailable responses might contain an optional Retry-After header.

Additional context

@Simply007 Simply007 added enhancement groomed The issue has been groomed and should be in a good shape. hacktoberfest https://hacktoberfest.digitalocean.com/ up-for-grabs labels Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement groomed The issue has been groomed and should be in a good shape. hacktoberfest https://hacktoberfest.digitalocean.com/ up-for-grabs
Projects
None yet
Development

No branches or pull requests

2 participants