This repository was archived by the owner on Apr 7, 2026. It is now read-only.
feat: enable client to server compression#2117
Merged
gcf-merge-on-green[bot] merged 2 commits intomainfrom Oct 20, 2022
Merged
Conversation
rajatbhatta
approved these changes
Oct 20, 2022
Contributor
rajatbhatta
left a comment
There was a problem hiding this comment.
I don't think we have any unit tests to check if server -> client compression is set. Does it make sense to add tests for that case?
Apart from that, the changes looks good to me.
Collaborator
Author
Thanks for the quick review. I've added a unit test to verify that the header for server -> client compression is included in the request. |
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Oct 28, 2022
🤖 I have created a release *beep* *boop* --- ## [6.32.0](https://togithub.com/googleapis/java-spanner/compare/v6.31.2...v6.32.0) (2022-10-27) ### Features * Enable client to server compression ([#2117](https://togithub.com/googleapis/java-spanner/issues/2117)) ([50f8425](https://togithub.com/googleapis/java-spanner/commit/50f8425fe9e1db16ed060337d26feccc9a9813e2)) * Increase default number of channels when gRPC-GCP channel pool is enabled ([#1997](https://togithub.com/googleapis/java-spanner/issues/1997)) ([44f27fc](https://togithub.com/googleapis/java-spanner/commit/44f27fc90fa3f9f4914574fb0476e971da4c02ff)) * Update result_set.proto to return undeclared parameters in ExecuteSql API ([#2101](https://togithub.com/googleapis/java-spanner/issues/2101)) ([826eb93](https://togithub.com/googleapis/java-spanner/commit/826eb9305095db064f52a15dc502bc0e0df9a984)) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring to v3.4.6 ([#2093](https://togithub.com/googleapis/java-spanner/issues/2093)) ([b08db44](https://togithub.com/googleapis/java-spanner/commit/b08db443229afdc1d49ef9f5e459cade5e2abe90)) * Update dependency com.google.cloud:google-cloud-monitoring to v3.5.0 ([#2113](https://togithub.com/googleapis/java-spanner/issues/2113)) ([99d825b](https://togithub.com/googleapis/java-spanner/commit/99d825b18397ff9e8633b89effa05e61159d956f)) * Update dependency com.google.cloud:google-cloud-monitoring to v3.6.0 ([#2125](https://togithub.com/googleapis/java-spanner/issues/2125)) ([7d86fe4](https://togithub.com/googleapis/java-spanner/commit/7d86fe40de29311ad65bd382e55f75326d16c4e3)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.5 ([#2122](https://togithub.com/googleapis/java-spanner/issues/2122)) ([308a65c](https://togithub.com/googleapis/java-spanner/commit/308a65c3e07e33f82b7ce474e0e95099192bb593)) * Update dependency com.google.cloud:google-cloud-trace to v2.3.7 ([#2094](https://togithub.com/googleapis/java-spanner/issues/2094)) ([6ec3f3f](https://togithub.com/googleapis/java-spanner/commit/6ec3f3f585ed5eaecdb09d5fd1eb6c9af3b22555)) * Update dependency com.google.cloud:google-cloud-trace to v2.4.0 ([#2114](https://togithub.com/googleapis/java-spanner/issues/2114)) ([84347f1](https://togithub.com/googleapis/java-spanner/commit/84347f1c6a52f3dfe569649f061cb16e2e466f6a)) * Update dependency com.google.cloud:google-cloud-trace to v2.5.0 ([#2126](https://togithub.com/googleapis/java-spanner/issues/2126)) ([5167928](https://togithub.com/googleapis/java-spanner/commit/516792809cf976aeab10709ca62503b7f03bb333)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.15 ([#2109](https://togithub.com/googleapis/java-spanner/issues/2109)) ([bf092ad](https://togithub.com/googleapis/java-spanner/commit/bf092ad7ac86c500e8a445397e192cb8fb0594ae)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.16 ([#2119](https://togithub.com/googleapis/java-spanner/issues/2119)) ([b2d27e8](https://togithub.com/googleapis/java-spanner/commit/b2d27e8f841cab096d5ccad64a250c7f0b35f670)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.15 ([#2110](https://togithub.com/googleapis/java-spanner/issues/2110)) ([d28b202](https://togithub.com/googleapis/java-spanner/commit/d28b202cfc29e8fbbfdf3612b94bab5c2f319419)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.16 ([#2120](https://togithub.com/googleapis/java-spanner/issues/2120)) ([151cf77](https://togithub.com/googleapis/java-spanner/commit/151cf778ff76edaee9e849181f72119ffa6cb897)) * Update dependency org.graalvm.sdk:graal-sdk to v22.2.0.1 ([#2102](https://togithub.com/googleapis/java-spanner/issues/2102)) ([68c2089](https://togithub.com/googleapis/java-spanner/commit/68c2089101124b9887af57b2697c35a64eb1a51f)) * Update dependency org.graalvm.sdk:graal-sdk to v22.3.0 ([#2116](https://togithub.com/googleapis/java-spanner/issues/2116)) ([9d6930b](https://togithub.com/googleapis/java-spanner/commit/9d6930b77ec479e5f517236852244476c23dc5c8)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable compression of network traffic from client to server.
See the below screenshots from Wireshark for tests that show that the compression works both ways. Note: The rate of compression will depend on the type of data that is being sent. The below example for client->server communication is for sending 1,000 very similar mutations to Spanner. That compresses very well with gzip. More random data will compress less.
Server -> Client - No Compression
Server -> Client - Gzip Compression
Client -> Server - No Compression
Client -> Server - Gzip Compression