Welcome! Log In Create A New Profile

Advanced

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

Jakob van Bethlehem
June 11, 2013 08:20AM
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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

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

Jakob van Bethlehem June 11, 2013 08:20AM

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

Maxim Dounin June 11, 2013 08:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 275
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready