Skip to content

Conversation

@shalarewicz
Copy link
Collaborator

@shalarewicz shalarewicz commented Jul 17, 2022

Summary

Creates a spec for the SlidingWindowLog rate limiting algorithm. The algorithm will work as follows:

  1. The user's request log is obtained from redis.
  2. Any requests that are older than window size are dropped from the log.
  3. The complexity of the current request is added to the complexity of all requests in the log.
  4. If the request exceeds the specified capacity it is dropped.
  5. Otherwise the request is allowed and the current request is added to the log.

Type of Change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Issues

Evidence

  • N/A this is just a spec.

@shalarewicz shalarewicz force-pushed the sh/sliding-window-log-spec branch from e8ae669 to 2d78a58 Compare July 17, 2022 00:01
@shalarewicz shalarewicz merged commit 5fe7133 into dev Jul 20, 2022
@shalarewicz shalarewicz deleted the sh/sliding-window-log-spec branch July 20, 2022 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write spec for Sliding Window Log class

4 participants