subrequest failover

James Lyons james.lyons at gmail.com
Wed Sep 15 05:56:38 MSD 2010


Thanks so much for help so far -- with what nginx version is "backup"
introduced?
I have:
378   upstream iks {
379     server 127.0.0.1:5397;
380     server www.testfailover.net:5397 backup;
381   }
------------
on startup I see:
2010/09/14 18:46:46 [emerg] 17835#0: invalid parameter "backup" in
/box/etc/nginx/nginx.conf.iksdev:380

I know we are using 0.6.39 -- which is old, so i suspect this is the
problem -- but my job has been reluctant to upgrade so far.  Is there
a workaround?

On Tue, Sep 14, 2010 at 6:19 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> Hello!
>
> On Tue, Sep 14, 2010 at 06:02:20PM -0700, James Lyons wrote:
>
>> so lets say I have a config that looks like:
>> upstream somename {
>>                 server www.somename1.net:80;
>>                 server www.somename2.net:80;
>>                 server www.somename3.net:80;
>> }
>>
>> location /data/ {
>> ...
>> proxy_pass http://somename/data/;
>> }
>> -------------
>> These names are processed as round robin I assume, but if a connection
>> to one fails -- it won't retry elsewhere.
>
> It will.
>
> http://wiki.nginx.org/NginxHttpProxyModule#proxy_next_upstream
>
>> To get that, i need to specify backup like in the example below.
>
> Backup servers are only tried if all normal servers were detected
> to be down.
>
>> But can I similarly specify multiple backups and have those load balanced
>> as well?
>
> Yes.
>
> Maxim Dounin
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>



More information about the nginx mailing list