coopernurse / node-pool

Generic resource pooling for node.js
2.38k stars 259 forks source link

Share pool between servers in a cluster #286

Closed lroal closed 3 years ago

lroal commented 3 years ago

Is there anyway to share the pool between multiple nodejs processes running in the same cluster ? Something like this (not sure if this works, it is old): https://www.npmjs.com/package/node-pool-cluster

Kikobeats commented 3 years ago

do a module.exports of your pool, then It can be used by other files I guess?

closing because is not a bug but feel free to reply 🙂

lroal commented 3 years ago

That is not going to solve it. I want to share the pool between all spawned child processes. Typically we create a node process for each CPU. Consider this a feature request if it is does not exist.

lroal commented 3 years ago

Pgbouncer typically solves this. But it would be great if node-pool had this built-in.