-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requesttestingRequires tests to be created or modifiedRequires tests to be created or modified
Description
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
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requesttestingRequires tests to be created or modifiedRequires tests to be created or modified