Possible causes for request time taking twice as long as upstream response time
mdounin at mdounin.ru
Wed Feb 29 11:28:24 UTC 2012
On Wed, Feb 29, 2012 at 10:38:26AM +0100, Simone Fumagalli wrote:
> On 02/04/2011 07:23 AM, Zev Blut wrote:
> > While looking at these logs I can see that sometimes these numbers have a fairly large delta.
> > For example one request's request_time is 1.553 while the upstream_response_time is 0.864.
> Hello, did you find any more info on this ? I was also doing
> tuning on my NGINX setup and I also wondering about this delta.
$request_time is a total time of request processing, including
reading request from a client and sending response to the client.
$upstream_response_time is a time of obtaining response from an
The $request_time variable is expected to be always larger than
$upstream_response_time one as in addition to $upstream_response_time
it also includes at least a) reading request from a client and b)
sending (buffered part of) the response to the client. Both (a)
and (b) may take a while.
More information about the nginx