node-redis
node-redis copied to clipboard
isolationPoolOptions have terrible defaults
Description
Currently node-redis uses the same default options as GenericPool for isolationPoolOptions
. Not only are the params poorly documented, the default parameters are not something you'd almost ever want. The default max pool size is 1, which means setting isolated: true
has no effect.
The package should either set new defaults, or warn in the documentation to always configure these if using isolated: true
.
Node.js Version
No response
Redis Server Version
No response
Node Redis Version
No response
Platform
No response
Logs
No response
Wow. And I was wondering why neither syntax for isolated
works properly...
There's almost a dozen of issues related to this topic!
Maybe you also could help me to learn why the following quits fine:
let client = createClient({
url: `${origin}/${database}`,
username: login,
password,
})
await client.connect()
await client.quit()
but the following stucks:
let client = createClient({
url: `${origin}/${database}`,
username: login,
password,
isolationPoolOptions: {
min: 10,
max: 20,
}
})
await client.connect()
await client.quit() // does not exit, keeps the whole Node/Bun process
🙏