Disabling proxy_buffering not working

Maxim Dounin mdounin at mdounin.ru
Tue May 7 11:53:21 UTC 2019


Hello!

On Mon, May 06, 2019 at 09:30:33PM +0000, Yuhao Zhang wrote:

> Hi, Thank you for the explanation. I definitely need to learn 
> more about the protocol spec. Would you help me understand why 
> the "proxy_buffer_size" affects the result even when 
> "proxy_buffering" is off?

This is because proxy buffer size limits the amount of data nginx 
can read from the backend in one read() operation, and hence 
limits maximum amount of data nginx will combine into a single 
chunk.

> Also, in my network topology, there are no other layer 7 hops. 
> nginx is the only thing talks HTTP, and it is directly 
> connecting to the backend server. I have also verified that, if 
> I bypass nginx and directly connect to the TCP port, everything 
> works just fine. So the chunks are not combined before they 
> reach nginx.

This doesn't really matter.  HTTP does not provide any guarantees 
about transfer encoding, and you should not assume chunk 
boundaries will be preserved.  They won't be.

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list