{"id":44898,"library":"express-throttle-redis","title":"Express Throttle Redis","description":"Redis storage adapter for express-throttle rate-limiting middleware for Express. Current version 0.0.4, released as an early-stage package with no recent updates. Provides a Redis-backed store for throttling rate limits across distributed Node.js servers. Unlike default in-memory stores, it allows shared state across multiple processes or machines via Redis. However, it does not implement key expiration, so memory grows unbounded; requires manual Redis configuration with LRU eviction. Alternative: use express-rate-limit with rate-limit-redis, which has more active maintenance and built-in key expiry.","status":"deprecated","version":"0.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/GlurG/express-throttle-redis","tags":["javascript","express","throttle","redis"],"install":[{"cmd":"npm install express-throttle-redis","lang":"bash","label":"npm"},{"cmd":"yarn add express-throttle-redis","lang":"bash","label":"yarn"},{"cmd":"pnpm add express-throttle-redis","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; express-throttle-redis is a store adapter for express-throttle","package":"express-throttle","optional":false},{"reason":"required to create a Redis client passed to the store constructor","package":"redis","optional":false}],"imports":[{"note":"CJS-only; no ESM or TypeScript types provided. Must use require.","wrong":"import RedisStore from 'express-throttle-redis';","symbol":"RedisStore","correct":"const RedisStore = require('express-throttle-redis');"},{"note":"express-throttle-redis exports only the store, not the throttle middleware itself.","wrong":"const throttle = require('express-throttle-redis');","symbol":"throttle","correct":"const throttle = require('express-throttle');"},{"note":"Constructor requires a Redis client instance, not optional.","wrong":"const store = new RedisStore();","symbol":"redisClient","correct":"const client = require('redis').createClient();\nconst store = new RedisStore(client);;"}],"quickstart":{"code":"const express = require('express');\nconst throttle = require('express-throttle');\nconst redis = require('redis');\nconst RedisStore = require('express-throttle-redis');\n\nconst app = express();\nconst client = redis.createClient({ url: process.env.REDIS_URL ?? 'redis://localhost:6379' });\n\napp.post('/search', throttle({\n  burst: 10,\n  rate: '5/s',\n  store: new RedisStore(client)\n}), (req, res) => {\n  res.json({ status: 'ok' });\n});\n\napp.listen(3000);","lang":"javascript","description":"Sets up an Express app with Redis-backed rate limiting using express-throttle and express-throttle-redis."},"warnings":[{"fix":"Configure Redis with maxmemory and maxmemory-policy allkeys-lru, or use a rate-limiting library with TTL support.","message":"No key expiration: All Redis keys set by express-throttle-redis never expire, causing memory to grow unbounded. Requires Redis maxmemory-policy allkeys-lru to avoid crash.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Switch to express-rate-limit with rate-limit-redis for active maintenance and features.","message":"Package is unmaintained since 0.0.4 (2017). No ESM, TypeScript types, or updates for modern Node.js or Express.","severity":"deprecated","affected_versions":">=0.0.4"},{"fix":"Use redis@2.x, or adapt by wrapping ioredis in a compatible interface.","message":"Constructor expects a Redis client from the redis package v2.x, not v3+ or ioredis. Using ioredis or redis v4 will break.","severity":"breaking","affected_versions":">=0.0.1"}],"env_vars":null,"search_vec":"'0.0.4':19 'across':41,55 'activ':94 'adapt':6 'allow':52 'altern':80 'back':35 'built':98 'built-in':97 'configur':76 'current':17 'default':46 'distribut':42 'earli':24 'early-stag':23 'evict':79 'expir':68 'expiri':101 'express':1,9,16,83,103 'express-rate-limit':82 'express-throttl':8 'grow':71 'howev':62 'implement':66 'in-memori':47 'javascript':102 'key':67,100 'limit':13,40,85,89 'lru':78 'machin':59 'mainten':95 'manual':74 'memori':49,70 'middlewar':14 'multipl':56 'node.js':43 'packag':26 'process':57 'provid':31 'rate':12,39,84,88 'rate-limit':11 'rate-limit-redi':87 'recent':29 'redi':3,4,34,61,75,90,105 'redis-back':33 'releas':20 'requir':73 'server':44 'share':53 'stage':25 'state':54 'storag':5 'store':36,50 'throttl':2,10,38,104 'unbound':72 'unlik':45 'updat':30 'use':81 'version':18 'via':60","created_at":"2026-06-07T12:52:23.108088+00:00","updated_at":"2026-06-07T12:52:23.108088+00:00","problems":[{"fix":"Use const RedisStore = require('express-throttle-redis');","cause":"Using ES6 import syntax which does not work with CJS default export.","error":"TypeError: RedisStore is not a constructor"},{"fix":"Ensure redis client is configured for cluster mode (e.g., require('redis').createCluster).","cause":"Using Redis cluster without proper client setup.","error":"Error: ReplyError: MOVED ..."},{"fix":"Pass new RedisStore(client) as the store option.","cause":"Passing a plain object instead of a RedisStore instance.","error":"Unhandled rejection: Error: The property 'store' must be an instance of a Store"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/GlurG/express-throttle-redis#readme","github":"https://github.com/GlurG/express-throttle-redis","docs":null,"changelog":null,"pypi":null,"npm":"express-throttle-redis","openapi_spec":null,"status_page":null,"smithery":null,"categories":["security","storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}