Skip to content

RetryBackoffFunc assumes the server always returns the Retry-After header during 429 responses #155

@mboruta1

Description

@mboruta1

As discussed in detail here, the default RetryBackoffFunc function assumes that all 429 error responses will contain a Retry-After header, which is not the case. According to RFC6585, 429 responses:

   The response representations SHOULD include details explaining the
   condition, and MAY include a Retry-After header indicating how long
   to wait before making a new request.

Not all users own their Openstack installations and can modify their HTTP load balancer to specify this header. Those that cannot can indeed overwrite said function, but when using higher level tools such as Terraform the process for doing so is either not obvious or does not exist.

Modifying the default retry implementation to use a user-specified Retry-After value if one was not provided by the server would be a relatively simple change and would be simple to integrate into tools like terraform-provider-openstack (much like this PR).

Lastly, 429 errors can be returned by load balancers charged with QoS/rate limiting excessive users and do not necessarily (or at all, at least in my experience) originate from the Openstack API endpoints themselves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions