node-postgres icon indicating copy to clipboard operation
node-postgres copied to clipboard

minIdleConnections

Open hernanhht opened this issue 5 years ago • 1 comments

We are using the pool in a very time sensitive scenario and we are analysing adding a feature to this pool where we can set a parameter like minIdleConnections that will allow us to always keep a minimum amount of connections in the pool and avoid the creation cost of new ones whenever we need to acquire one.

Before jumping into this I would like some advice on this topic.

As a reference, we got good results with keeping a huge amount of connections in the pool by setting idleTimeoutMillis to 0 but that screwed our load balancing schema. We are now trying with different values for this parameter for the time being.

hernanhht avatar Apr 23 '20 11:04 hernanhht

I am surprised this still isn't a feature, it would be incredibly useful for a lot of applications. Most other libraries have something comparable.

jeremysteele avatar Jul 25 '22 13:07 jeremysteele