Improve retry policy for requests #84
Labels
enhancement
groomed
The issue has been groomed and should be in a good shape.
hacktoberfest
https://hacktoberfest.digitalocean.com/
up-for-grabs
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 theRetry-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 optionalRetry-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:Please note that both
429 Too many requests
and503 Service Unavailable
responses might contain an optionalRetry-After
header.Additional context
The text was updated successfully, but these errors were encountered: