Big difference between upstream response time and request time

Maxim Dounin mdounin at
Wed Oct 15 22:03:39 MSD 2008


On Wed, Oct 15, 2008 at 10:25:20AM -0700, Praveen wrote:

> Hi,
> I'm using nginx as a reverse proxy to my backends. I see there is a
> huge discrepancy between upstream response time and request time.
> X.X.X.X [15/Oct/2008:09:32:57 -0700] "GET /js/something.js HTTP/1.1"
> upstream_response_time 0.005 request_time 105.026 90732578
> It's generally negligible. But sometimes its as high as 5 or more
> seconds, and in some cases as high as the example above.
> Any idea what's happening? nginx is running on a dedicated server, and
> has about 2000 active connections.

The $request_time variable measures wall clock time it took to 
fully process request, from first byte got from client to last 
byte sent to client.  This includes time spent waiting for client 
and may really vary depending on what client does / quality of 
client's network connection / etc.

Generally you shouldn't pay much attention to this number unless 
you have control over the client in question.

Maxim Dounin

More information about the nginx mailing list