Is it possible to monitor the fair proxy balancer?

Grzegorz Nosek grzegorz.nosek at
Sat Jun 28 16:31:32 MSD 2008

On sob, cze 28, 2008 at 03:08:46 +0200, Robbie Allen wrote:
> Kind of a big limitation with fair if it provides ZERO instrumentation.

I'll try to hack something up to provide upstream_fair statistics but it'll
require a patch to nginx (i.e. --add-module won't be enough). Hopefully Igor
agrees to incorporate it.

As for dynamically adding/removing backends, mentioned elsethread, it
isn't trivial as it would basically require restarting nginx workers anyway
(at least for upstream_fair, which keeps its state in shared memory).
Disabling/enabling predefined backends would be fine though.

However, there still remains the issue of communication between the load
balancer and the outside world, i.e. *how* would you like to be told
that a backend has been deemed up/down and *how* would you like to tell
nginx that backend is currently down?

Also, while I have your attention ;)

Alex complained in his blog post that upstream_fair does not provide a way
to limit the maximum number of requests per backend. As parsing of 'server'
directives in upstream{} blocks is done by nginx, I cannot easily add
options there, so I see two possibilities:

 - a new option, e.g. max_requests 10 10 20 20 (specifying the number
   for each backend in the order of server directives)

 - overloading (with old/new/both behaviours possibly selectable by a
   per-upstream flag) the meaning of weight=X parameter

So, what say you, is such a feature (amounting to returning 502 errors
after a certain amount of concurrent requests is reached) generally
desired? If so, how would you like to configure it?

BTW, I seem to receive more flak about upstream_fair recently, are you
people starting to use it? :)

Best regards,
 Grzegorz Nosek

More information about the nginx mailing list