Redis-backed distributed rate limiting implementation for the tokenthrottle interface. Stable version 1.2.0, with low release cadence. Provides shared rate limiting across multiple servers/processes using Redis as backend. Unlike local-only throttles, it supports atomic operations via Redis to maintain consistency. Requires ioredis or redis client. Expires unused tokens to save memory.
npm install tokenthrottle-redisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Redis-backed throttle (100 req/s) and uses it as Express rate-limiting middleware.
Use redis@3 or newer version with async/await and promise-based API; wrap client as needed.
Ensure Redis server version is >=2.6 or use a compatible alternative.
Migrate to a maintained rate limiter like express-rate-limit or rate-limiter-flexible.
Set a unique prefix in options: { prefix: 'myapp:throttle' }.Pass an object with required properties: throttle({ rate: 100 })Ensure you create throttle with require('tokenthrottle-redis')(options, redisClient) and call throttle.rateLimit(id, callback).Upgrade Redis to >=2.6 or use a different rate limiter that does not require EVAL.