nginx icon indicating copy to clipboard operation
nginx copied to clipboard

default NGINX_BROTLI_COMP_LEVEL to big

Open Punk-UnDeaD opened this issue 5 years ago • 1 comments

I think level 6 - not best idea. It slower than gzip, also i can't use brotli_static and gzip together for static files. I runed some tests and think than 2 - better level by default, response smaller than gziped and nginx work fast.

Punk-UnDeaD avatar Nov 22 '19 10:11 Punk-UnDeaD

Hi, I agree we should set it lower because our default gzip comp level is currently 1. I would say we should also set it to 1, further optimizations depend on the CPU resources and the nature of the content.

Ref:

  • https://paulcalvano.com/index.php/2018/07/25/brotli-compression-how-much-will-it-reduce-your-content/
  • https://samsaffron.com/archive/2016/06/15/the-current-state-of-brotli-compression
  • https://blog.cloudflare.com/results-experimenting-brotli/

If we want to set it higher, brotli should be 5 (to enable context modeling) but gzip in this case should probably be around 8-9.

csandanov avatar Nov 25 '19 05:11 csandanov