-
Notifications
You must be signed in to change notification settings - Fork 283
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
channel pool 发送数据的问题 #47
Labels
help wanted
Extra attention is needed
Comments
+1 |
@zhwaaaaaa @guohao |
guohao
pushed a commit
to guohao/brpc-java
that referenced
this issue
Aug 21, 2019
guohao
added a commit
to guohao/brpc-java
that referenced
this issue
Aug 21, 2019
guohao
added a commit
to guohao/brpc-java
that referenced
this issue
Aug 22, 2019
wenweihu86
pushed a commit
that referenced
this issue
Aug 23, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我初略看了一下你们这个源码。发现你们是从channel pool中获取一个channel,然后注册一个定时器timeout,然后做序列化,然后同步阻塞发送数据直到数据发送出去,然后回收连接。
我觉得可以换一个过程,可以省掉连接池,和定时器,不知道是否会对性能有提升。
先序列化 -> 在获取channel -> 发送数据(不需要等待数据发送出去,把数据交给netty排队)->设置定时器(使用socketChannel.eventLoop()的定时功能,把定时操作放在selector上)。
首先我觉得这个过程可以减少对每次发送对channel的占用时间,使用更少的channel就可以有相同的并发量,然后省掉了定时器线程
The text was updated successfully, but these errors were encountered: