Recommended setup for grpc c++ in high latency environments where messages are large - bdp & controlling frame size / possible bdp=0 bug

109 views
Skip to first unread message

Michael Tavares

unread,
Jan 13, 2025, 10:25:18 AM1/13/25
to grpc.io
Question:
Is there a preferred grpc setup optimised for a high latency environment with large messages? Also is there a reason I get erratic behaviour when bdp is switched off via the channel args?

Background:
We have a windows client written in c++ connecting to a c++ windows service using grpc. The client / server connection has a ping value of 50ms+. 

The client typically requests responses in the order of 2MB (grpc compresses this to 1.4MB).

When using GRPC_TRACE with http and flowctl, I noticed that grpc is receiving about 90 incoming packets (I assume) of size 16384 when client and server are in different geographical regions, but this packet size bumps up when server and client are on the same machine (bdp is adjusting packet size through flow control).

I have played around with multiple parameters but cannot change the window size. See below.

grpc.http2.bdp_probe=0 bug?
I have also noticed that ClientReaderInterface<T>::Read returns false intermittently when I switch off bdp using grpc.http2.bdp_probe=0. (It therefore fails). (I do not use the Reactor interface eventhough my API defines a stream as there is only 1 item being returned.)

Params:
* grpc.http2.bdp_probe
* grpc.http2.lookahead_bytes
* grpc.optimization_target
* grpc.http2.max_frame_size
* grpc.experimental.http2.enable_preferred_frame_size

Michael T

unread,
Feb 12, 2025, 6:17:13 PM2/12/25
to grpc.io
hi, does anyone have any suggestions on optimising this kind of environment?

Also has anyone experienced issues with switching the bdp off?

I use completion queues on the server within the c++ framework.
Reply all
Reply to author
Forward
0 new messages