Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Hybrid connection pooling mode #182

Open
notsure2 opened this issue Mar 9, 2022 · 2 comments
Open

Feature request: Hybrid connection pooling mode #182

notsure2 opened this issue Mar 9, 2022 · 2 comments

Comments

@notsure2
Copy link
Contributor

notsure2 commented Mar 9, 2022

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.

@qwerttvv
Copy link

qwerttvv commented Apr 3, 2022

that's cool:)

@dev4u
Copy link

dev4u commented Apr 6, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants