When the response body of the back-end server is larger than proxy_temp_file_write_size, the response will be buffered in the temporary file in the proxy_temp_path directory; when the client's request body is larger than client_body_buffer_size, the request will be cached in the temporary file in the client_body_temp_path directory. Therefore, when nginx processes requests or responses with large amounts of data, the disk IO pressure corresponding to the temporary directory is high and may become a system bottleneck. Application should be based on application scenarios and
Data size, reasonable configuration proxy_temp_file_write_size and client_body_buffer_size, appropriately reduce the need to cache to temporary files.
The above introduces the nginx cache path configuration optimization, including nginx content. I hope it will be helpful to friends who are interested in PHP tutorials.