Skip to content

Write spec for Sliding Window Log class #67

@shalarewicz

Description

@shalarewicz

With the FixedWindow algorithm, users are able to send more requests to go through at the edges of a window. The SlidingWindowLog algorithm addresses this issue by tracking request timestamps in in a log then removing these requests from the log once they fall outside of the window. If a request is received and there are more than capacity requests in the log then the request is dropped.

A spec for the SlidingWindowLog algorithm should be decided on prior to writing tests. The constructor should accept parameters for the following:

windowSize - Size of the window in milliseconds
capacity - number of requests allowed during each window
client - redis client instance

The SlidingWindowLog class must implement RateLimiter

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions