Description
Is your feature request related to a problem? Please describe.
Occasionally, the AWS metadata services will fail to fetch credentials. One common cause I've seen is the status code 429 TooManyRequestsException
, which means too many requests are sent in a short time period and the client is rate limited.
The RemoteProviderConfig
type allows passing a maxRetries
value to each client, however, it does not give options for how those retries should occur.
Here's an image of a trace where I had a client get rate limited with maxRetries
set to 5. Notice, all of the calls fail, as all of the calls are separated by under 1ms. If the metadata endpoint is failing because of rate limiting issues, it is unlikely to not be rate limited .5ms later.
Describe the solution you'd like
I want to have an additional field to specify a retry strategy. This could be as simple as a retryDelay
parameter that takes in how much time to wait for linear retries, or could be a set of fields that specifies if the retry should be exponential/linear, etc.
Describe alternatives you've considered
none
Additional context
none