Cloak icon indicating copy to clipboard operation
Cloak copied to clipboard

Feature request: Hybrid connection pooling mode

Open notsure2 opened this issue 2 years ago • 2 comments

Hello,

I got an idea for a useful feature:

Add a new parameter: Multiplex = true/false with default being true for NumConn > 0

If Multiplex = false and NumConn > 0. Then the connections are used as a pool (single connection for single tcp connection) and any excess TCP connections behave as NumConn = 0 until a pooled connection is free.

NumConn = 0 automatically implies Multiplex = false.

If I get some time I'll try to implement this.

notsure2 avatar Mar 09 '22 22:03 notsure2

that's cool:)

qwerttvv avatar Apr 03 '22 23:04 qwerttvv

除了数据库连接,没人这么玩的。 因为要处理上下文的切换、后续是否还有数据会推送到之前的连接中? 我认为,这个成本高于重新建立一个新连接的成本。

dev4u avatar Apr 06 '22 00:04 dev4u