-
Notifications
You must be signed in to change notification settings - Fork 532
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
gRPC: Support S2 compression #9322
Conversation
f98ac71
to
0f15b7c
Compare
833b840
to
d72a6ac
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.
Looks good!
99502b7
to
bc0ea78
Compare
Dropping the Snappy compatible mode, since I don't see a use for it in practice. AFAICT for it to be at all useful, it has to replace the Snappy compressor (same name). When using the "s2-snappy" compressor name, unpatched Mimir instances don't recognize it and fail to accept the connection. |
56ecc92
to
c9a3d50
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
@@ -76,6 +77,7 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet, logger log.Logger) { | |||
f.StringVar(&cfg.Addr, "query-frontend.instance-addr", "", "IP address to advertise to the querier (via scheduler) (default is auto-detected from network interfaces).") | |||
f.IntVar(&cfg.Port, "query-frontend.instance-port", 0, "Port to advertise to querier (via scheduler) (defaults to server.grpc-listen-port).") | |||
|
|||
cfg.GRPCClientConfig.CustomCompressors = []string{s2.Name} |
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.
uh, so we need to pass this to all clients? I somehow thought it would be enough to register it in dskit "globally".
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.
Maybe we can find a better solution after this PR?
Support S2 and S2 in Snappy compatible mode gRPC compression. Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
39ce34d
to
b646eb8
Compare
Yes
Ср, 25 сент. 2024 г. в 17:12, Arve Knudsen ***@***.***>:
… ***@***.**** commented on this pull request.
------------------------------
In pkg/util/grpcencoding/s2/s2.go
<#9322 (comment)>:
> @@ -0,0 +1,88 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Provenance-includes-location: https://github.com/mostynb/go-grpc-compression/blob/f7e92b39057ca421a6485f650243a3e804036498/internal/s2/s2.go
+// Provenance-includes-license: Apache-2.0
+// Provenance-includes-copyright: Copyright 2022 Mostyn Bramley-Moore.
+
+// Package s2 is an experimental wrapper for using
+// github.com/klauspost/compress/s2 stream compression with gRPC.
+package s2
Aha, so basically you prefer option 1: Just copy into Mimir without
retaining any copyright? Just so we're 100% clear :)
—
Reply to this email directly, view it on GitHub
<#9322 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJLTVUECIWJZV6KEYIUSPTZYLHFZAVCNFSM6AAAAABON2MKLKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMRYGU4TOOBRGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks, added your tests/benchmarks. |
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
85191fd
to
c866870
Compare
What this PR does
Support S2 (a Snappy extension) gRPC compression, via custom gRPC compressor support in dskit.
Based on grafana/dskit#583.
I've done a test deployment internally, and everything seems to work.
See favourable test results vs Snappy.
Which issue(s) this PR fixes or relates to
Supersedes #9292. Fixes #8522.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.