A connection pooling library for Redis in Node.js, version 4.0.1. It manages a configurable number of Redis connections internally, distributing requests across available connections and handling release automatically. This package wraps the popular 'redis' client library and exposes a simplified subset of Redis commands (get, set, hgetall, lpush, etc.) plus a sendCommand method for arbitrary commands. It is TypeScript-ready with full type definitions. Release cadence is low (sporadic) but the API is stable. Compared to manual pool management, this library abstracts all acquisition and release logic, reducing boilerplate and common errors like forgetting to return connections.
npm install redis-connection-poolNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Redis connection pool, sets and gets a key, executes a custom command via sendCommand, and shuts down the pool.
Update to >=4.0.0 and adapt configuration: replace 'host'/'port' options with 'url' or 'socket' object. Also ensure your code uses async/await or promises instead of callbacks.
Await the call to redisPoolFactory or use .then(). Old code that assigned the result synchronously will receive a Promise instead of the pool object.
Ensure all commands have resolved before calling shutdown, e.g., by awaiting all your Redis calls or using a counter.
Call the default export as a function (with await) or import the class directly (import RedisConnectionPool from 'redis-connection-pool').
Use await: const redisPool = await redisPoolFactory('pool', options);Ensure you are not using the pool after shutdown. Check your Redis server availability and network.
Upgrade to >=4.0.0 and ensure the pool is correctly initialized. sendCommand was added in v4.