nginx日志记录请求响应时间
修改日志格式
1 | http { |
几个时间变量的解释
- $request_time – Full request time, starting when NGINX reads the first byte from the client and ending when NGINX sends the last byte of the response body
- $upstream_connect_time – Time spent establishing a connection with an upstream server
- $upstream_header_time – Time between establishing a connection to an upstream server and receiving the first byte of the response header
- $upstream_response_time – – Time between establishing a connection to an upstream server and receiving the last byte of the response body
nginx日志记录请求响应时间