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

Support for changing the default compression level when enabling server response compression #3244

Open
juliojgd opened this issue May 14, 2024 · 5 comments
Labels
help wanted We need contributions on this type/enhancement A general enhancement

Comments

@juliojgd
Copy link

Motivation

In the server compression related documentation the only configurable parameters are enabled (boolean) and minimum size for a payload to be compressed (int).

There is no method in Reactor Netty HttpServer that allows to set the compression level (int) that is effectively available in Netty's HttpContentCompressor class but it's not available in the default SimpleCompressionHandler

It cannot be set in the Reactor Netty HttpServerResponse either.

Desired solution

To add a configurable property (maybe named "compression-level" or "gzip-compression-level") to allow changing the default compression level (6 - gzip) to any other compression level that the developer needs to set.

@juliojgd juliojgd added status/need-triage A new issue that still need to be evaluated as a whole type/enhancement A general enhancement labels May 14, 2024
@violetagg violetagg removed the status/need-triage A new issue that still need to be evaluated as a whole label May 15, 2024
@violetagg
Copy link
Member

@juliojgd Are you interested in providing a PR? Which Reactor Netty version should enable this feature (1.1.x or 1.2.x)?

@juliojgd
Copy link
Author

@violetagg we are using Spring Boot 3.2.x so I guess we'd need 1.1.x. I'll try to provide a PR.

The source branch to checkout for the changes would be https://github.com/reactor/reactor-netty/tree/1.1.x , right?

Thanks in advance

@violetagg
Copy link
Member

The source branch to checkout for the changes would be https://github.com/reactor/reactor-netty/tree/1.1.x , right?

yes

@violetagg violetagg added this to the 1.1.20 milestone May 15, 2024
@violetagg violetagg modified the milestones: 1.1.20, 1.1.21 Jun 5, 2024
@violetagg violetagg added the help wanted We need contributions on this label Jun 18, 2024
@violetagg violetagg modified the milestones: 1.1.21, General Backlog Jun 18, 2024
@raccoonback
Copy link

@violetagg
Hello,
I would like to ask if I can take ownership of this issue and work on resolving it.
Additionally, please let me know if there are any guidelines or considerations I should be aware of before starting.

@violetagg
Copy link
Member

@raccoonback Yes sure, go for it. Please follow the contribution guide https://github.com/reactor/.github/blob/main/CONTRIBUTING.md

raccoonback pushed a commit to raccoonback/reactor-netty that referenced this issue Dec 28, 2024
raccoonback pushed a commit to raccoonback/reactor-netty that referenced this issue Dec 28, 2024
raccoonback pushed a commit to raccoonback/reactor-netty that referenced this issue Dec 28, 2024
raccoonback added a commit to raccoonback/reactor-netty that referenced this issue Dec 28, 2024
raccoonback added a commit to raccoonback/reactor-netty that referenced this issue Dec 29, 2024
raccoonback added a commit to raccoonback/reactor-netty that referenced this issue Dec 29, 2024
- gzip: only the range 0 to 9 is allowed
- deflate: only the range 0 to 9 is allowed
- zstd: only the range -7 to 22 is allowed

brotli and snappy compression are supported by default.

fix: reactor#3244
raccoonback added a commit to raccoonback/reactor-netty that referenced this issue Dec 29, 2024
- gzip: only the range 0 to 9 is allowed
- deflate: only the range 0 to 9 is allowed
- zstd: only the range -7 to 22 is allowed

brotli and snappy compression are supported by default.

fix: reactor#3244
raccoonback added a commit to raccoonback/reactor-netty that referenced this issue Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We need contributions on this type/enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants