Skip to content

http_backoff does not respect Retry-After headers on 429 requests #2360

Open
@Skylion007

Description

@Skylion007

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
It surprises me that the http-after does not seem to respect Retry-After headers if I am reading the codebase properly. It's pretty easy to add directly into the requests library using an adapter and the Requests Retry object like so: https://github.com/fsspec/filesystem_spec/blob/262f664574e091228251b467ac92b2a6c327034b/fsspec/implementations/dbfs.py#L54 or by parsing the proper HTTP field. This would reduce the amount of errors encountered I find when trying to stream data lots of data from the Hub and would also implement nice effective client-side rate limiting.

Describe the solution you'd like
A clear and concise description of what you want to happen.
Respect Retry-After headers, especially on 429 status codes.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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