netty – How to enable TCP_QUICKACK and configure MaxFrameSize with java grpc?

We are building a Java17 gRPC client that calls streaming APIs and receives responses ranging from very small size (few bytes) to large responses (a few megabytes).

gRPC official docs recommend using Netty implementation but it doesn’t support enabling TCP_QUICKACK or configuring max frame size to a larger value. NettyChannelBuilder.

Java17 added ExtendedSocketOptions, supporting TCP_QUICKACK, but there is no way to enable it on the gRPC Netty channel.

In our testing we found that for large responses, both these settings considerably improve performance.
As these settings aren’t configurable by default, we had to fork the grpc netty packages.
This is not a good long term approach so looking for suggestions on how we can do this without forking standard packages.

We also looked at custom channel initialization setup, but couldn’t figure out the right way to bootstrap. Any suggestions or references would be much appreciated.

Read more here: Source link