C++ grpc::ClientBidiReactor high read latency

23 views
Skip to first unread message

Marc Tibout

unread,
May 6, 2021, 5:05:47 PMMay 6
to grpc.io
I am seeing high latency for the OnReadDone() callbacks in my C++ gRPC client for a bi-directional stream RPC.
Requests from the client and responses from the server are completely asynchronous.
Using grpc-dump (https://github.com/bradleyjkemp/grpc-tools) generated output, I see that incoming server responses are only triggering the OnReadDone() callback after a variable delay of 2 to 5 seconds.
There is no such issue with the requests sent to the server.
The OnReadDone(ok) implementation is systematically calling StartRead() once the incoming message has been processed (unless ok is false in which case the rpc is terminated).
Any idea what can be done to investigate further this issue?
Thanks!
OS: Linux
gRPC version: 1.34.1 (and 1.37.1)

Marc Tibout

unread,
May 11, 2021, 9:17:46 AMMay 11
to grpc.io
I fixed the latency issue by setting the GRPC_CLIENT_CHANNEL_BACKUP_POLL_INTERVAL_MS environment variable to a small value (default is 5000 ms).
Reply all
Reply to author
Forward
0 new messages