Problems combining 'backup' command in upstream block with 'fair'-command

Jakob van Bethlehem jakob at jet-stream.nl
Tue Jun 11 12:19:46 UTC 2013


Dear users,

My first message here; I discussed my issue already with some folks on IRC; my main conclusion was that I should try it with a broader audience. So here's the problem:
* we're using the ngx_http_upstream_module, and ngx_http_upstream_fair_module together with the HttpProxyModule
* The 'proxy'-configuration looks like this:
location "/jvbnet/betsy/ip-vhost-trial/" {
	rewrite "^/jvbnet/betsy/ip-vhost-trial/(.*)$" "/$1" break;
	proxy_pass http://0893697e3d3e9e1a78d79c5d3b13c258;
	proxy_set_header Host rd.devel.xxx-xxxxx.nl;
	proxy_cache cache;
}

* There is a separate configuration file defining the upstream: 
upstream 0893697e3d3e9e1a78d79c5d3b13c258 {
	server 172.17.88.10;
	server 172.17.88.20 backup;
	fair;
}

* What I see:
- If no connection can be made to 172.17.88.10 (because I switched off Apache over there), no roll-over to 172.17.88.20 happens
- Next I remove the 'fair' command:
upstream 0893697e3d3e9e1a78d79c5d3b13c258 {
	server 172.17.88.10;
	server 172.17.88.20 backup;
}

- Now, in the same situation, nginx -does- rollover to 172.17.88.20, as I expected

* What I expected: nginx performing rollover in the first scenario

I get the same results if more non-backup servers are configured. And if I put 'fair' as the first command in the initial scenario:
upstream 0893697e3d3e9e1a78d79c5d3b13c258 {
	fair;
	server 172.17.88.10;
	server 172.17.88.20 backup;
}

the nginx configuration tester gives an error:
nginx: [emerg] invalid parameter "backup"

To me it seems that the fair-module does not cooperate properly with the 'backup' parameter. Did anyone else notice this problem, and if so, is there a workaround/solution? Are there other configuration issues I may have to check?

Sincerely,
Jakob van Bethlehem

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130611/5e12672b/attachment.html>


More information about the nginx mailing list