This is a library that provides different algorithms to perform rate limiting for javascript applications. It provides four algorithms: token bucket, fixed window counter, sliding window log, and sliding window counter. You can read more about algorithms in this article. I didn't include a leaky bucket algorithm because its implementation that denies requests instead of delaying them is a mirror image of the token bucket algorithm and will, given equivalent parameters, provide the same results.
Features:
- Four algorithms: token bucket, fixed window counter, sliding window log, sliding window counter
- Multiple ways to store data: In-memory store, Redis store
Technologies:
- Typescript
- Node test runner