Nginx status: count requests before or after forwarding to backend server?


I have set up a nginx instance for static content that forwards dynamic
content to a backend Apache server via the upstream module. I use munin
to monitor both the nginx and Apache requests per second. Now I am
wondering how to interpret the results and how the nginx-status works.

If I have 10000 requests per second on nginx-status and 2000 requests
per second on Apache server-status, does that mean I have a total of
12000 request coming in on my server? Does nginx count a request that is
forwarded to Apache and increments its total number of requests in
nginx-status? Or does this mean that the 10000 requests per second are
what is handled by nginx, not counting the forwarded requests to Apache?

Thank you for your answer!

Best regards,
Jonas Kaufmann

Posted at Nginx Forum:,88022,88022#msg-88022


Nginx counting all connections - from client to nginx and from nginx
to backend (apache/fascgi/whatever), so, nginx handle 10k req/s and
apache 2k.

Little simple math :slight_smile:

apache 2k
nginx proxy (connection client-apache, nginx as proxy) - 2k time 2 = 4k
nginx all connection 10k
nginx static connection, where backend is not involved (nginx all
connection minus proxy) - 10k minus 4k = 6k

Best Regards
2010/5/19 j0nes2k [email protected]: