-
-
Notifications
You must be signed in to change notification settings - Fork 315
rework gateway compression #2000
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
Conversation
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.
I've only briefly looked over it - I do have questions (e.g. the payload decompressor seemingly being added twice?) but nothing blocking.
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, just nitpicks
This pull request completely rewrites how gateway compression works and adds zstd support. Previously, gateway compression went through a PayloadDecompressor pulling the current compression mode from the configuration; now we register a different compression service based on the determined compression mode. This supports a default selection as outlined in the new documentation; attempting to load zstd and falling back to zlib if zstd is unavailable.
This pull request improves zlib performance somewhat, especially zlib-payload (which is no longer a default-recommended option due to its many shortcomings as payload-wise decompression). Zstd performs considerably better due to not needing to copy memory or make temporary allocations beyond what the native implementation requires.
closes #2015