-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server: expose API to set send compressor #5744
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sincere apologies for the delay in getting to this PR.
e890733
to
b19a201
Compare
@easwars thanks much for the review, I have addressed the comments. Please review when you get a chance |
4128531
to
e05f066
Compare
This PR is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed. |
e05f066
to
8be817f
Compare
8be817f
to
6d03a48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo the one testing nit. Thanks!
@easwars please take another pass on this after the latest set(s) of changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see previous comment re: adding a comment. (Updating state.)
Fixes #5792
Follow-up of #5541 and #2786
Description:
In the current implementation, the server compresses the send payload when the client sends a compressed request payload or explicitly uses the
grpc.RPCCompressor
option. It cannot be controlled by the user to either use a different compression algorithm or disable compression (identity
).This PR exposes an API
grpc.SetSendCompressor(ctx, name)
similar to thegrpc.SetHeader(ctx, md)
, which allows the user to set the compressor to be used for compressing response payload (sent back to the client). The provided compressor is used when the below conditions are met:grpc-accept-encoding
metadata.Other gRPC platforms expose similar APIs, for example grpc-java.
RELEASE NOTES: