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

Implement Leaky Bucket Algorithm #54

Open
shalarewicz opened this issue Jun 23, 2022 · 2 comments
Open

Implement Leaky Bucket Algorithm #54

shalarewicz opened this issue Jun 23, 2022 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request testing Requires tests to be created or modified

Comments

@shalarewicz
Copy link
Collaborator

shalarewicz commented Jun 23, 2022

Implement LeakyBucket class per the spec in #50. The implementation should pass the tests written in #52

The LeakyBucket algorithm works similarly to TokenBucket except that requests are processed at a fixed rate. The algorithm is usually implemented with a FIFO queue and works as follow:

  • When a request arrives, the limiter checks if the queue is full. If it is not full, the request is added to the queue.
  • Otherwise, the request is dropped (a 429 status is sent)
  • Requests are pulled from the queue and processed at regular intervals
@shalarewicz shalarewicz added the enhancement New feature or request label Jun 23, 2022
@shalarewicz
Copy link
Collaborator Author

Add retryAfter to rate limiter response per #89

@evanmcneely evanmcneely added testing Requires tests to be created or modified documentation Improvements or additions to documentation labels Aug 6, 2022
@evanmcneely
Copy link
Contributor

Include testing and spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request testing Requires tests to be created or modified
Projects
None yet
Development

No branches or pull requests

3 participants