HTTP2 compression vs. gRPC compression

81 views
Skip to first unread message

Aaron Beitch

unread,
Mar 15, 2018, 6:36:52 PM3/15/18
to grpc.io
Hello,

We just had a minor panic internally at my company when we realized that gzip compression is not enabled on any of our gRPC services. After making the code changes to enable gzip we then had the realization that the http2 client/server is probably already doing compression.

A couple questions:

1) Do gRPC messages get compressed by the http2 layer by default?

2) Why would I enable gzip compression in gRPC if it is being done by http2? Is the answer that I shouldn't be enabling gzip compression in gRPC, but the flexibility is there in case I want to enable a different compression scheme or I'm not using http2?

I'm using the gRPC-Go, btw, if that makes any difference.

Thanks,
Aaron

spenc...@google.com

unread,
Mar 19, 2018, 4:18:34 PM3/19/18
to grpc.io
Hi Aaron,
Compression in gRPC is optional and not enabled by default. Did you see something that led you believe your traffic was compressed?

Aaron Beitch

unread,
Mar 19, 2018, 7:39:28 PM3/19/18
to grpc.io
I had just assumed it was being compressed by HTTP2, but I guess that is not the case. Thanks for the correction.
Reply all
Reply to author
Forward
0 new messages