Hi Easwar,
Thank you for responding - it turned out to be an issue with the client 
forwarding the server responses. The stream from the server was read 
correctly by the 2 concurrent threads on the client, but they were not 
forwarding it to a downstream process correctly.
Thanks.
-Asha

On Wednesday, 19 May 2021 at 13:50:01 UTC-4 Easwar Swaminathan wrote:

> You should not have to use a separate connection for every RPC call. The 
> `grpc.ClientConn` returned from a call to `grpc.Dial` manages connections 
> to multiple backends under the covers. And even if there are not multiple 
> servers to connect to, each RPC is only a stream, and streams can be 
> multiplexed on a single connection.
>
> Are you sure you are not blocking the main server thread in someway that 
> is not allowing you to serve more than one RPC at a time?
>
> On Friday, May 14, 2021 at 1:19:52 PM UTC-7 Asha Prabhakaran wrote:
>
>> Hi,
>> I have a golang GRPC client and a C++ GRPC server providing a synchronous 
>> service.
>> We have been using a new connection for every RPC call.
>> When I attempt to use the same connection for multiple concurrent RPC 
>> calls, only one of them succeeds whereas the others keep waiting.
>> Is it possible to use the same connection for concurrent RPC calls?
>>
>> Connection creation:
>> conn, err := grpc.*Dial*(url, c.opts...)
>>
>> For each RPC:
>> client := pb.*NewXXServer*(conn) 
>> stream, err := client.*GetXX*(lctx, req)
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/41d447a0-adcf-45fc-b78d-344648224861n%40googlegroups.com.

Reply via email to