pjfanning opened a new issue, #923:
URL: https://github.com/apache/pekko-grpc/issues/923
Pekko gRPC clients always send uncompressed requests. Compressed responses
are decompressed, and the server already negotiates gzip for its responses
(`Codecs.negotiate`), but a client cannot compress what it sends.
Current state:
- pekko-http backend: `PekkoHttpClientUtils.createChannel` hard-codes
`GrpcProtocolNative.newWriter(Identity)`. The comment there says "Configuring a
different default could be a future feature. Configuring compression per call
could be a future power API feature."
- Netty backend: grpc-java supports `CallOptions.withCompression("gzip")`,
but Pekko gRPC exposes no way to set it.
- `GrpcClientSettings` and the `RequestBuilder`s have no compression option.
Proposal:
- A client setting (e.g. `GrpcClientSettings.withCompression` /
`pekko.grpc.client."*".compression`, default none) that compresses requests
with a supported codec (`gzip`) on both backends.
- Optionally, a per-call option on the request builders, like `setDeadline`
(#922).
- A client can't know which algorithms a server supports
(https://github.com/grpc/grpc/blob/master/doc/compression.md), so the default
stays uncompressed.
- Tests against both backends and the interop server. Docs in
`client/configuration.md`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]