Hi,
I'm using grpc-java 1.0.0.pre2, and it seems like server-side/response compression may not be working.
I'm making a synchronous call from a client, and sending ~40k objects, e.g. FooRequest.newBuilder().addAllPaths(...40k...).build().
The server then collects it's own 40k objects (again paths) and returns it as the response to the client's request, e.g.
responseObserver.onNext(FooResponse.newBuilder().addAllPaths(...40k...).build());
responseObserver.onCompleted();
These 40k objects are all basically file paths + a long modification time, and there will be a lot of duplication in the paths (e.g. /home/.../ in all of them), so compression should really help with the payload size, so I'm turning on gzip:
Channel c = NettyChannelBuilder.forAddress(host, port).negotiationType(NegotiationType.PLAINTEXT).maxMessageSize(maxMessageSize).build();
MirrorStub stub = MirrorGrpc.newStub(c).withCompression("gzip");
However, nethogs shows that the client request is ~400kb, but the server's response is ~5mb. Even though in theory, the request and response should be exactly the same size (the response is responding with essentially the same input the client sent).
Basically it looks like the server is not responding with a gzip'd response.
I'm not registering any decompression factory with the server, but AFAICT gzip is one of the defaults:
ServerImpl rpc = NettyServerBuilder.forPort(port).maxMessageSize(maxMessageSize).addService(new MirrorServer()).build();
Before I go digging, is this expected? That the server's response would not be compressed?
Thanks,
Stephen