Does anyone know when, specifically, the clock for $upstream_response_time
begins and ends?
The documentation seems a bit vague:
keeps time spent on receiving the response from the upstream server; the time is kept in seconds with millisecond resolution. Times of several responses are separated by commas and colons like addresses in the $upstream_addr variable.
There is also an $upstream_header_time
value, which adds more confusion.
I assume $upstream_connect_time
stops once the connection is established, but before it is accepted upstream?
After this what does $upstream_response_time
include?
A more specific definition is in their blog.
$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
So
$upstream_header_time
is included in $upstream_response_time
.