question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

async-ratelimiter does not support `redis` library

See original GitHub issue

The 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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
3imed-jabericommented, Jul 18, 2021

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 🎉.

1reaction
niftylettucecommented, Jul 19, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found