<div dir="ltr">Hi all,<div><br></div><div>I'm the maintainer of an open source module ngx_brunzip_module (<a href="https://github.com/splitice/ngx_brunzip_module/blob/master/ngx_http_brunzip_filter_module.c">https://github.com/splitice/ngx_brunzip_module/</a>). Effectively the same as the gunzip module (and based off that source) but with Brotli.</div><div><br></div><div>I've been scratching my head for 2 days regarding some high CPU usage within the chain code. It appears that some spinning is possible. I must admit I only have a basic understanding of the filter chain in nginx (still gaining experience).<br><br></div><div>1. I was wondering if someone could take a look at the code and give me some pointers?</div><div><br></div><div>2. Also I've added some code to prevent further filling of mostly full buffers (as it appears brotli is quite expensive to start) at <a href="https://github.com/splitice/ngx_brunzip_module/blob/master/ngx_http_brunzip_filter_module.c#L408">https://github.com/splitice/ngx_brunzip_module/blob/master/ngx_http_brunzip_filter_module.c#L408</a> is this valid? How does nginx determine when backpressure from full output chains is relieved? Is there any in-depth documentation of the filter chain architecture?</div><div><br></div><div>Regards,<br>Mathew</div><div><br></div></div>