On Wed, Mar 14, 2012 at 08:52:50AM -0400, Bai Shen wrote:
Is there a reason to have it on?
Yes, the default “proxy_buffering on” is appropriate for most
cases. It ensures minimal processing overhead and takes slow
clients off your upstream servers (which are in many cases
process-based and can’t handle many connections).
The “proxy_buffering off” is only appropriate in specific
situations like long-running connections where you send small
chunks of data periodically and need them to be immediately
delivered to client(s).
Is there any recommended settings?
The default is good enough. If it doesn’t fit you needs, you may
consider tuning proxy_buffers and/or proxy_max_temp_file_size.
If you don’t want to hit disk in any case, you may use
which disables disk buffering completely. Note that for obvious
reasons it will limit nginx ability to offload slow clients from
saying that an “upstream response is buffered to a temporary file”. Is