Forum: NGINX $rquest_time for only the time it spent getting data from the upstream

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3e026293f2500750b8f1e96640af6020?d=identicon&s=25 Christian Parpart (Guest)
on 2014-06-02 16:01
(Received via mailing list)
Hey all,

we used $request_time in the past to measure how long it took to serve
certain pages, this was never the problem, because there was something
in
front of nginx, thus, the client read/write operatings didn't influence
the
$request_time as much as a real client would.

However, now, that we'd like to skip that extra level of indirection, we
can't actually measure the time it took to actually process the request,
as
$request_time now kind of doubles because internet clients are slow
usually.

So is there a way to log the time the request handler required to "just
handle the request internally", without the reads and writes from/to the
client?

Many thanks in advance,
Christian Parpart.
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-06-02 16:48
(Received via mailing list)
Hello!

On Mon, Jun 02, 2014 at 04:00:28PM +0200, Christian Parpart wrote:

>
> So is there a way to log the time the request handler required to "just
> handle the request internally", without the reads and writes from/to the
> client?

Try looking at the $upstream_response_time variable, see here for
details:

http://nginx.org/r/$upstream_response_time

--
Maxim Dounin
http://nginx.org/
This topic is locked and can not be replied to.