[edit] uwsgi_buffering

syntax: uwsgi_buffering on | off

default: uwsgi_buffering on

context: http, server, location

version: 1.1.5

variables: no

This directive controls response buffering of the response.

If buffering is activated, then nginx reads the response from the upstream server as fast as possible, saving it in the buffer as configured by directives uwsgi_buffer_size and uwsgi_buffers. If the response does not fit into memory, then parts of it will be written to disk.

If buffering is switched off, then the response is synchronously transferred to client immediately as it is received. nginx does not attempt to read the entire answer from the upstream server, the maximum size of data which nginx can accept from the server is set by directive uwsgi_buffer_size.

For Comet applications based on long-polling it is important to set uwsgi_buffering to off, otherwise the asynchronous response is buffered and the Comet does not work.

Buffering can be set on a per-request basis by setting the X-Accel-Buffering header in the response.


Module: HttpUwsgiModule