A Redis client pool abstraction (v2.0.13, 2024) that manages connections in a pool, supporting both single-node and cluster Redis deployments. Built on top of ioredis, it provides acquire/release semantics for cases where multiple connections are beneficial (blocking commands, pub/sub, large payloads). Provides typescript types and exposes a unified interface (IORedisClientPool) with methods for commands, pipelines, and Lua scripts. Currently only supports ioredis, with no plans for other backends. Release cadence is low, with no recent updates. Key differentiator: offers connection pooling over a single-threaded Redis client, which is uncommon.
npm install redis-abstractionNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a single-node Redis pool, acquires a connection, runs SET and GET commands, then releases the connection.
Wrap pool.run() in try/catch or use ioredis retry strategy in the connection factory.
Always use try/finally or use a wrapper that manages acquire/release automatically.
If you need a different Redis client (e.g., node-redis), consider using it directly.
Start Redis locally (docker run --name test-redis -p 6379:6379 -d redis:latest) or update connection string.
Ensure you instantiate IORedisClientPool with a connectionInjector and use the returned instance.