Skip to content

Commit 964b8de

Browse files
authored
docs: clarify connection pooling in createClient and fix broken link in isolationPoolOptions (#2896)
- Added a Connection Pooling section in `createClient` documentation to clarify that a single connection is typically sufficient and to provide guidance on when to use a connection pool. - Updated `isolationPoolOptions` description with a more precise explanation and replaced the broken link with a reference to `createClientPool`. - Changes made based on issue #2845.
1 parent 47e2970 commit 964b8de

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/client-configuration.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
| disableOfflineQueue | `false` | Disables offline queuing, see [FAQ](./FAQ.md#what-happens-when-the-network-goes-down) |
2626
| readonly | `false` | Connect in [`READONLY`](https://redis.io/commands/readonly) mode |
2727
| legacyMode | `false` | Maintain some backwards compatibility (see the [Migration Guide](./v3-to-v4.md)) |
28-
| isolationPoolOptions | | See the [Isolated Execution Guide](./isolated-execution.md) |
28+
| isolationPoolOptions | | An object that configures a pool of isolated connections, If you frequently need isolated connections, consider using [createClientPool](https://github.com/redis/node-redis/blob/master/docs/pool.md#creating-a-pool) instead |
2929
| pingInterval | | Send `PING` command at interval (in ms). Useful with ["Azure Cache for Redis"](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-best-practices-connection#idle-timeout) |
3030

3131
## Reconnect Strategy
@@ -81,3 +81,9 @@ createClient({
8181
}
8282
});
8383
```
84+
## Connection Pooling
85+
86+
In most cases, a single Redis connection is sufficient, as the node-redis client efficiently handles commands using an underlying socket. Unlike traditional databases, Redis does not require connection pooling for optimal performance.
87+
88+
However, if your use case requires exclusive connections see [RedisClientPool](https://github.com/redis/node-redis/blob/master/docs/pool.md), which allows you to create and manage multiple dedicated connections.
89+

0 commit comments

Comments
 (0)