Precisions about $upstream_response_time

Maxim Dounin mdounin at mdounin.ru
Fri Nov 20 18:27:48 UTC 2015


Hello!

On Fri, Nov 20, 2015 at 07:01:45PM +0100, B.R. wrote:

> http://nginx.org/en/docs/http/ngx_http_upstream_module.html#var_upstream_response_time
> 
> Does this represents the time from the end of the request forward to the
> upstream until it starts to answer (kinda TTFB)?
> Or does that include the whole response has been received, excluding the
> time taken to forward it to the client?
> Or maybe something else?

It's the time taken to get full response from an upstream server, 
not just time to first byte.  It doesn't take into account 
anything related to sending the response to the client, though it 
should be kept in mind that in some cases a client can delay 
reading a response from an upstream server, see 
http://nginx.org/r/proxy_buffering.

If you want something similar to TTFB, take a look at 
$upstream_header_time.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list