Nginx variable to know the number of active connections

Hello,

Is there a way to get the number of active connections in order to
activate
or a not a cache mechanism when nginx is in a high trafic period?

Regards
Jerome

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,245738,245738#msg-245738

Hello!

On Fri, Dec 20, 2013 at 09:54:21AM -0500, gglamenace wrote:

Hello,

Is there a way to get the number of active connections in order to activate
or a not a cache mechanism when nginx is in a high trafic period?

The following variable are available in the
ngx_http_stub_status_module:

$connections_active,
$connections_reading
$connections_writing
$connections_waiting


Maxim D.
http://nginx.org/

Oh great, so i can parameter using a cache mechanism using
fastcgi_cache_path or the Lua Module SRCACHE for my PHP upstream block
simply by checking for example $connections_waiting on each request.
I don’t know exactly what would be a right setting for using a cache by
testing $connections_waiting. I have to do some tests.

thank you

Jérôme

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,245738,245741#msg-245741

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs