The fair proxy balancer
grzegorz.nosek at gmail.com
Mon Dec 3 21:33:44 MSK 2007
On Mon, Dec 03, 2007 at 02:10:44PM +0100, Alexander Staubo wrote:
> This is primarily aimed at Grzegorz Nosek, the author of the "fair"
> proxy balancer patch for Nginx, but I'm posting this here in case
> others want to chip in.
Well, here I am. Bullseye :)
> I posted the following on Ezra Zygmuntowicz's blog recently, in
> conjunction with the announcement of the patch. After I posted this,
> we have been seeing some rather more extreme examples of non-uniform
> request distributions, with some mongrels piling up lots and lots of
> connections while other sit completely idle.
The standard question -- have you tried the latest snapshot? :) (though
it might not be any different, asking just in case). Also, as you mention 5
10 second requests, please increase:
#define FS_TIME_SCALE_OFFSET 1000
in file src/http/modules/ngx_http_upstream_fair_module.c (line 407 in my
copy) to e.g. 20000. I'll make it configurable without recompiling
nginx, too (or remove it at all, if I find an elegant solution). Requests
running this long may confuse the module which might just result in the
behaviour you're seeing.
If increasing FS_TIME_SCALE_OFFSET does not help, could you please
compile nginx --with-debug and gather the debug_http data?
> Mongrel is running with a custom extension I have written that extends
> the process title with status information. The three numbers are the
> port, the number of concurrent requests ,and total number of requests
> processed during the mongrel's lifetime What is apparent from this
> output is that a bunch of the mongrels are generally not used. This
> would not be a problem if several other mongrels were not being forced
> to process multiple concurrent requests. Because of the giant Rails
> lock, this means certain requests will be queued after other requests,
> which impairs response time. (We have a lot of fairly slow requests,
> in the 5-10-second range.)
More information about the nginx