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

Router uses Brotli compression at 11 - highest compression/longest to encode, please adjust and make configurable #6857

Open
theJC opened this issue Feb 25, 2025 · 0 comments

Comments

@theJC
Copy link
Contributor

theJC commented Feb 25, 2025

Describe the solution you'd like

Router uses Brotli compression at 11 which is the highest quality/longest to encode which often can be good for static resources but not intended for dynamic resources where latency and TTFB is critical.

Router code has a 2 year old FIXME in code to change this:

// FIXME: find the "fast" brotli encoder params
"br" => {
return Some(Compressor::Brotli(Box::new(BrotliEncoder::new(
BrotliEncoderParams::default(),
))))

This BrotliEncoderParams::default() results in compression quality of 11.

dropbox/rust-brotli#93

Change Router to explicitly default to a value that is more reasonable for dynamic workloads, and make this configurable via config yaml so your customers can control what level is used.

Describe alternatives you've considered

Disabling compression and having other components on the network path that are configurable do that work instead

Additional context

@theJC theJC changed the title Router uses Brotli compression at 11 - highest quality/longest to encode, please adjust and make configurable Router uses Brotli compression at 11 - highest compression/longest to encode, please adjust and make configurable Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant