async-ratelimiter does not support `redis` library
See original GitHub issueThe old ratelimiter
library has an ioredis
check:
var isIoRedis = Array.isArray(res[0]);
var count = parseInt(isIoRedis ? res[1][1] : res[1]);
var oldest = parseInt(isIoRedis ? res[3][1] : res[3]);
var oldestInRange = parseInt(isIoRedis ? res[4][1] : res[4]);
but async-ratelimiter
does not.
This will cause erroneous 429s to occur with the latest version of koa-ratelimit
for people using the regular redis library. Please list this as a breaking change.
https://github.com/microlinkhq/async-ratelimiter/issues/22
I’m not interested into support node-redis since ioredis have all the features necessaries and the project is well maintained 🙂
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
async-redis-rate-limiter - npm
Rate limit any action using a centralized Redis instance. async-redis-rate-limiter is intended to be used when your servers are distributed ...
Read more >asyncio-redis-rate-limit - PyPI
Rate limiter for async functions using Redis as a backend. Features. Small and simple; Can be used as a decorator or as a...
Read more >API Rate Limiting with Node and Redis | by Joyce Lin
js , create a route to first check the rate limit, and then allow access to resources if the user is not over...
Read more >let app.use() wait untill connection to redis instance is made
This code will not work because app.use(ratelimiter) is executed before the redis connection has established. Moving the RateLimiter code inside ...
Read more >Limitador — Rust web dev library // Lib.rs
An embeddable rate-limiter library supporting in-memory, Redis and Infinispan data stores ... Notice that the keys and variables are generic, so they do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi guys, I fixed the missing behave in async-ratelimiter and now everything work just I wait @niftylettuce to merge my PR #62 and everything done 🎉.
v5.0.1 released to npm
https://github.com/koajs/ratelimit/releases/tag/v5.0.1