翻译 Enables or disables buffering of responses from the proxied serverWhen buffering is enabled nginx receives a response from the proxied server as soon as possible saving it into the buffers set by t
启用或禁用对代理服务器的响应的缓冲。
当启用缓冲时,nginx会尽快从代理服务器接收响应,并将其保存到由proxy_buffer_size和proxy_buffers指令设置的缓冲区中。如果整个响应无法放入内存中,则部分响应可以保存到磁盘上的临时文件中。写入临时文件由proxy_max_temp_file_size和proxy_temp_file_write_size指令控制。
当禁用缓冲时,响应会同步传递给客户端,即在接收到响应时立即传递。nginx不会尝试从代理服务器读取整个响应。nginx一次从服务器接收的数据的最大大小由proxy_buffer_size指令设置。
还可以通过在“X-Accel-Buffering”响应头字段中传递“yes”或“no”来启用或禁用缓冲。可以使用proxy_ignore_headers指令禁用此功能。
原文地址: http://www.cveoy.top/t/topic/hOjD 著作权归作者所有。请勿转载和采集!