Skip to content
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

feat: support compression on gRPC server #3961

Merged
merged 14 commits into from
May 20, 2024

Conversation

shuiyisong
Copy link
Contributor

@shuiyisong shuiyisong commented May 16, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

This pr mainly supports gRPC server compression encoding options(gzip, zstd). Now gRPC server is allowed to receive requests with such encoding.

In this pr we also enable zstd compression encoding by default between frontend and datanode.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label May 16, 2024
@shuiyisong shuiyisong marked this pull request as ready for review May 17, 2024 06:50
@shuiyisong shuiyisong requested a review from a team as a code owner May 17, 2024 06:50
@github-actions github-actions bot added docs-required This change requires docs update. and removed docs-not-required This change does not impact docs. labels May 17, 2024
Copy link

codecov bot commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.16%. Comparing base (d7f1150) to head (7f7a027).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3961      +/-   ##
==========================================
- Coverage   85.45%   85.16%   -0.30%     
==========================================
  Files         977      977              
  Lines      169275   169277       +2     
==========================================
- Hits       144655   144161     -494     
- Misses      24620    25116     +496     

src/common/grpc/src/channel_manager.rs Outdated Show resolved Hide resolved
src/servers/src/grpc.rs Outdated Show resolved Hide resolved
Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

src/servers/src/grpc.rs Outdated Show resolved Hide resolved
src/servers/src/grpc/builder.rs Outdated Show resolved Hide resolved
@shuiyisong shuiyisong marked this pull request as draft May 20, 2024 03:26
@shuiyisong shuiyisong marked this pull request as ready for review May 20, 2024 07:07
@shuiyisong
Copy link
Contributor Author

@sunng87 @waynexia PTAL

@github-actions github-actions bot added docs-not-required This change does not impact docs. and removed docs-required This change requires docs update. labels May 20, 2024
@waynexia waynexia added this pull request to the merge queue May 20, 2024
Merged via the queue into GreptimeTeam:main with commit 19543f9 May 20, 2024
22 checks passed
@waynexia waynexia deleted the feat/grpc_server_gzip branch May 20, 2024 11:45
WenyXu pushed a commit to WenyXu/greptimedb that referenced this pull request May 21, 2024
* feat: enable gzip in grpc server side

* feat: add enable_gzip_compression config

* test: add grpc compression test

* feat: support user configured compression on grpc server

* chore: update doc

* chore: add tests

* fix: make config-docs

* chore: fix cr issue

* chore: add test

* refactor: remove config on server side, auto enable all compression support

* chore: minor update

* chore: remove unused code

* refactor: enable zstd compression internally by default

* chore: minor fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants