Skip to content

client: gophercloud should respect "Retry-After" response header #2096

@kayrus

Description

@kayrus

When OpenStack service throttles and responses with the 429 response code and "Retry-After" response header, provider client should backoff and wait for "Retry-After" before the next try.

The default backoff function should be called unless the RetryBackoffDisabled provider struct member is true. This will allow to enable the backoff logic by default and simplify the integration in dependent projects.

In order to give more control, the RetryBackoffFunc provider struct member can be defined (by analogy with ReauthFunc).

The default MaxBackoffRetries provider struct member should be set to DefaultMaxBackoffRetries const. When an amount of backoff retries is greater than MaxBackoffRetries, provider client should return the 429 error.

Reference:

see also #1918

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions