Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace rate limiter by retryablehttp #6

Merged
merged 3 commits into from
Aug 25, 2021

Conversation

cgroschupp
Copy link
Contributor

@cgroschupp cgroschupp commented Aug 17, 2021

desec lower the limit for rrsets to 2/s: https://github.com/desec-io/desec-stack/blob/4df53eb8e63e6d68d6d7a2b3390c293fe13822e3/api/api/settings.py#L115

I think it is better to use the Retry-After http header for this case when a 429 error occurs, since the limits can be updated at any time.

To avoid reinventing the wheel, I used https://github.com/hashicorp/go-retryablehttp.

I will update this projects https://github.com/go-acme/lego and https://github.com/Valodim/terraform-provider-desec because i have the problem in both.

Fixes #2
Fixes Valodim/terraform-provider-desec#5

@ldez ldez self-requested a review August 17, 2021 09:49
@ldez ldez added the enhancement New feature or request label Aug 17, 2021
@ldez ldez merged commit 9f01ed7 into nrdcg:master Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle rate limiting using the Retry-After Header Mass deletion of records runs into rate limiting
2 participants