You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2021/04/28 09:14:40 UTC

[GitHub] [ratis] runzhiwang commented on a change in pull request #474: RATIS-1371. Support multi-client when transfer data between servers

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.




-- 
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:
users@infra.apache.org