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

Challenge 27 - Rate limiter #39

Merged
merged 15 commits into from
Oct 8, 2023
Merged

Challenge 27 - Rate limiter #39

merged 15 commits into from
Oct 8, 2023

Conversation

jainmohit2001
Copy link
Owner

Created a Rate limiter server using express.
Added support for the following algorithms:

  • token bucket
  • fixed window counter
  • sliding window log
  • sliding window counter (with Redis support)

The Redis support uses the extended version of Redis supporting JSON data types. (https://redis.io/docs/data-types/json/)

Added Token Bucket rate limiter
Added command line arg parsing for choosing rate limiter type
Created args for all rate limiter classes.
Moved command line access to index.ts.
Added test for Token Bucket Rate Limiter.
Added cleanup function for all Rate limiter classes.
Added test for fixed window counter rate limiter.
Added tests for Sliding Window Log RL.
Fixed logic for Sliding Window Counter RL.
Fixed limit conditions in Sliding Window Log RL.
Added export for server and RL class from server.ts
@jainmohit2001 jainmohit2001 merged commit 7ed96d8 into master Oct 8, 2023
1 check failed
@jainmohit2001 jainmohit2001 deleted the rate-limiter branch October 12, 2023 06:28
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.

1 participant