Ideally, as much as possible, you should reduce the amount of requests being forwarded to the backend server. The following directive will help you build a caching system, as well as control buffering options and the way Nginx handles temporary files:
Directive |
Description |
proxy_buffer_size Context: http, server, location |
Sets the size of the buffer for reading the beginning of the response from the backend server, which usually contains simple header data. The default value corresponds to the size of 1 buffer, as defined by the previous directive (proxy_buffers). Syntax: Numeric value (size) Example: proxy_buffer_size 4k; |
proxy_buffering, proxy_request_buffering Context: http, |