runzhiwang commented on a change in pull request #474:
URL: https://github.com/apache/ratis/pull/474#discussion_r621979428



##########
File path: 
ratis-netty/src/main/java/org/apache/ratis/netty/server/NettyServerStreamRpc.java
##########
@@ -174,7 +183,9 @@ public void channelRead(ChannelHandlerContext ctx, Object 
msg) {
         }
 
         final DataStreamRequestByteBuf request = 
requestRef.set((DataStreamRequestByteBuf)msg);
-        requests.read(request, ctx, proxies::getDataStreamOutput);
+
+        int index = (int)request.getStreamId() % clientNum;

Review comment:
       use streamId to mod maybe not the best choice, because when there are 
1000 clients, each only send one stream to server, all the streamId maybe zero, 
then we can not balance the proxies. Maybe we can use a static variable in 
server to record how many stream, and use this variable to mod.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to