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

Use http rate limiting headers to decide when to retry requests #156

Open
1 task done
aaguiarz opened this issue Jan 8, 2025 · 1 comment
Open
1 task done

Use http rate limiting headers to decide when to retry requests #156

aaguiarz opened this issue Jan 8, 2025 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@aaguiarz
Copy link
Member

aaguiarz commented Jan 8, 2025

Checklist

Describe the problem you'd like to have solved

We are currently retrying requests on 429s based on a hard coded timestamp.

Describe the ideal solution

We should use the http headers to retry. In the example below we'd wait 6 seconds:

Retry-After: 6

Alternatives and current workarounds

No response

References

No response

Additional context

No response

@aaguiarz aaguiarz added the enhancement New feature or request label Jan 8, 2025
@aaguiarz aaguiarz added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 8, 2025
@aaguiarz
Copy link
Member Author

aaguiarz commented Jan 8, 2025

An example of a rate limited request

HTTP/1.1 429 Too Many Requests
Date: Wed, 08 Jan 2025 18:50:01 GMT
Content-Type: application/json
Content-Length: 63
Connection: close
Server: nginx
Retry-After: 6
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
]X-Content-Type-Options: nosniff
X-Ratelimit-Limit: 10
X-Ratelimit-Remaining: 0
X-Ratelimit-Reset: 1736362261

{
  "code": "rate_limit_exceeded",
  "message": "rate limit exceeded"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: Backlog
Development

No branches or pull requests

1 participant