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

Add retryAfter calculations to TokenBucket and SlidingWindowCounter #89

Closed
shalarewicz opened this issue Jul 27, 2022 · 0 comments · Fixed by #79
Closed

Add retryAfter calculations to TokenBucket and SlidingWindowCounter #89

shalarewicz opened this issue Jul 27, 2022 · 0 comments · Fixed by #79
Assignees
Labels
enhancement New feature or request

Comments

@shalarewicz
Copy link
Collaborator

The TokenBucket and SlidingWindowCounter rate limiters do not return a retryAfter timestamp. This timestamp represents the minimum time at which a new request could be sent so that it succeeds. retryAfter should have the following values:

  • 0 if the request succeeds
  • Infinity if the request exceeds the window/bucket capacity
  • timestamp > now if the request can be allowed in the future.
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
2 participants