I think there's a problem with brotli #722
-
Hi, The following configuration in nginx/conf/conf.d/include/brotli.conf doesn't bring a lot :
First, it encompasses all types and compresses everything (including formats like eventually music or webp which are already compressed), then comp_level 0 brings close to nothing, and finally brotli_static on is only a advantage if your server already has files in .br already stored in the same folder. (Understand : if you have a index.html.br next to index.html, nginx will directly deliver that file and won't compress on the fly). If I may, here's my suggestion for a better config snippet :
If you want, a ratio of 6 (which is recommended) is a better trade off between compression and CPU load. I am currently trying it via the file custom/server_proxy.conf and so far I don't see any problems. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I'd also add an edit for gzip from :
To
|
Beta Was this translation helpful? Give feedback.
-
Hello, maybe I explain why I use this options: |
Beta Was this translation helpful? Give feedback.
Hello, maybe I explain why I use this options:
brotli_static on; : doesn't hurt, if someone provides this files it will use them, if not it won't use them
brotli on; : self explaining
brotli_comp_level 0; : maybe read this PR comments: nextcloud/all-in-one#2576 and this: https://blog.cloudflare.com/results-experimenting-brotli
brotli_types *; level 0 is very fast compression and compression is only done if a client requests it, so compression can be applied to anything