I know channel should be reused.
but any differece in nerwork round trip between creating and reusing clients each grpc call ?
Code 1:
GrpcChannel channel = GrpcChannel.ForAddress("https://127.0.0.1:22137");
for(int i = 0; i < 100; i++)
{
CmdService.CmdServiceClient rpcClient = new CmdService.CmdServiceClient(channel);
CmdResponse resp = rpcClient.RunCommand(new CmdRequest(), deadline: DateTime.UtcNow.AddSeconds(10));
}
channel.Dispose();
Code 2:
GrpcChannel channel = GrpcChannel.ForAddress("https://127.0.0.1:22137");
CmdService.CmdServiceClient rpcClient = new CmdService.CmdServiceClient(channel);
for (int i = 0; i < 100; i++)
{
CmdResponse resp = rpcClient.RunCommand(new CmdRequest(), deadline: DateTime.UtcNow.AddSeconds(10));
}
channel.Dispose();
code2 and code1 has any differece in nerwork round trip ?