unit icon indicating copy to clipboard operation
unit copied to clipboard

Gzip/Brotli compressions on NGINX Unit

Open nailarch opened this issue 2 years ago • 10 comments

Enabling gzip/brotli compression on pure NGINX is relatively simple. However, I want to enable gzip/brotli compression for NGINX Unit. I'm not seeing anything on the NGINX Unit configuration man page about how to do the same for NGINX Unit. Is the option not currently supported?

nailarch avatar Nov 17 '22 08:11 nailarch

Unit itself, does not support compressing responses.

Depending on your app though, this is something you could do app side. For example, Ruby has a Deflater middleware that one can enable, or, you can put Nginx in front on Unit and have Nginx do the work for you.

travisbell avatar Nov 17 '22 17:11 travisbell

Hi @nailarch as @travisbell already mentioned currently there is no GZip support in Unit. But this is something on our list of features.

tippexs avatar Nov 20 '22 09:11 tippexs

Unit can serve static files but there is a trick to provide separate match for each of values from Accept-Encoding

andypost avatar Jul 10 '23 00:07 andypost

If you're interested in testing some patches that do gzip, there's #914

It would be interesting to see testing on real world workloads and connections, and not just my localhost loops. :)

alejandro-colomar avatar Sep 05 '23 03:09 alejandro-colomar