Skip to content

Rate limit pause can't use Hetzner's rate limit headers #71

Description

@lexfrei

robotlb can't see how much of the Hetzner rate limit is left, so it only reacts after a 429. Hetzner sends RateLimit-Limit and RateLimit-Remaining on every response, but the generated hcloud client drops response headers, both on success and on error.

The pause from #37 therefore uses a fixed backoff from one minute up to 16 minutes. RateLimit-Reset is not a better pause either. It marks the moment the budget is full again, which can be up to an hour away, while one request becomes available every second.

I've asked upstream for access to the headers in HenningHolmDE/hcloud-rust#43. Once it lands, robotlb could slow down as RateLimit-Remaining gets low and pause only as long as the budget needs to recover. Nothing to do here until then.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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