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

关于adpter启用队列模式问题 #212

Closed
BeyondWUXF opened this issue Jan 11, 2022 · 6 comments
Closed

关于adpter启用队列模式问题 #212

BeyondWUXF opened this issue Jan 11, 2022 · 6 comments

Comments

@BeyondWUXF
Copy link
Contributor

如果rpc服务端的adpter调用enableQueueMode()启用队列模式,如果服务端业务线程数量大于客户端的网络线程数量,是不是有部分业务线程一直处于空闲状态?如果我的理解没错的话有没有解决方案?

@ruanshudong
Copy link
Contributor

对,会有这个现象.
其实就是要加大客户端到服务器的连接数, 比如客户端多部署几台服务器之类? 最新版本支持obj名称加#, 来建立多个servant连接, obj#1, obj#2, 但是这个特性只有cpp支持, 且还没有经过大规模验证.

@BeyondWUXF
Copy link
Contributor Author

1.多部署几台客户端能缓解,但是对于同一个客户端的请求还是有这种想象吧?
2.假设服务端有3个业务线程,客户端通过obj#1,obj#2,obj#3与一台服务器建立3个连接,是这样的吧?
3.另外,新版这种方式是子servant吗?

@ruanshudong
Copy link
Contributor

1 是的
2 对, 建立三个
3 目前直接communictor->stringToProxy("obj#1") 来创建, 每个数字都代表不同的连接, 但是子servant还没有支持这个(只在http proxy上支持), 理想的是 prx=communictor->stringToProxy("obj"), prx->tars_set_muticonnection(10), 来支持多连接, 内部用子servant来支持, 但是这个还没有实现

@BeyondWUXF
Copy link
Contributor Author

新版是3.0后的版本吧

@ruanshudong
Copy link
Contributor

master or release/3.0

@BeyondWUXF
Copy link
Contributor Author

ok我看下

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

2 participants