How I scaled Nginx Brotli compression 16× with Rust and just 4 threads
A Rust implementation of Brotli compression offloads work from Nginx’s event loop to its native thread pool. The author reports up to 4× throughput at Brotli level 6 and 16× at level 9 versus ngx_brotli, using one worker and four threads; the trade-offs include a slightly lower compression ratio and more memory for parallel segments.
Reddit commenters questioned comparisons with Zstandard and raised memory/DoS concerns for many concurrent downloads. The author reports about 32 MB peak memory in one multithreaded test with 64 connections and a 512 KB window, but larger concurrency and workload coverage remain open questions.