HI again
We tcpdump the traffic.
We see the first 16kb frame is sent from the client to the server, but the 2nd one is not sent until an ack is returned from the server.
In our case, our msg size is 30KB, and round trip latency is ~220ms.
So because of this, call takes ~440ms instead of ~200ms.
We set the InitialWindowSize and InitialConnWindowSize to 1MB, on both server and client - no change.
We checked both unary RPCs and Stream RPCs - the same.
We set the WriteBufferSize and ReadBufferSize to zero (write/read directly to/from the wire) - 95% latency remained the same, but Avg latency dropped by 100ms - not sure why it had this effect.
Again, in all of the conditions above, if we increase to rate of messages to more then 2 or 3 per second, the latency drops to 450ms
Looking at http2debug=2 logs, we see it seems that in the higher rate the when latency is low, grpc somehow uses a previous opened stream used by another RPC to sent the new RPC....
Anyone has encountered a similar behaviour. ?
Anyone that understand GRPC implementation (Go lang) can explain why it behaves this why and if there is a way to make it work better ?
Any help would be very much appreciated
Thanks !