-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add client-side request compression #5113
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
base: master
Are you sure you want to change the base?
Add client-side request compression #5113
Conversation
|
Thanks @tank-500m for the PR! We are taking a look and considering our options. We're a little unsure about the additional dependencies that are being added, and we need to think about how the new option impacts the overall API, and whether we have something else within k6 that does something similar already (enabling compression). We will get back to you with next steps soon. |
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.
Hi @tank-500m,
Thanks for your contribution and patience while we discuss this internally.
We've happy to move forward with this PR since it does indeed look like it is useful and it doesn't impact any planned future work.
What we're still a little unsure of are the dependencies that are being added. The dependency that we would like you to reconsider is:
- github.com/mostynb/go-grpc-compression v1.2.3
Is there a way to avoid having to add anything new to repo and still have GRPC compression?
|
@ankur22 If we drop If remove snappy (optional): similarly, we can wire up github.com/golang/snappy. gzip: continues to use the built-in gRPC gzip support. This keeps the external surface area small while still giving users a practical compression choice (zstd is the main ask for high-throughput gRPC). Let me know if you prefer zstd-only to start; I can push an update that adds an internal zstd compressor + registry and removes the mostynb dependency. |
@tank-500m I think this is a good step forward. If you could implement the changes to allow for this single compression (zstd) without adding any external dependencies, please 🙇 |
|
@ankur22 |
What?
Enable client-side gRPC request compression in k6.
Support opt-in codecs: gzip, zstd, and snappy.
Why?
Bandwidth & cost savings: large protobuf messages and high RPS scenarios benefit from request compression.
Checklist
make check) and all pass.Checklist: Documentation (only for k6 maintainers and if relevant)
Please do not merge this PR until the following items are filled out.
Related PR(s)/Issue(s)