Balancer Algorithms

Grzegorz Nosek grzegorz.nosek at gmail.com
Thu Nov 20 15:12:33 MSK 2008


On Thu, Nov 20, 2008 at 12:08:05PM +0000, Stephen Nelson-Smith wrote:
> Hi,
> > so this should work:
> >
> > upstream  backend  {
> >    server   backend1.example.com;
> >    server   backend2.example.com backup;
> > }
> 
> That looks good.  If I add backend3.example.com backup, I assume that
> is used only if backed2 fails.

No, not really (AFAIK). There are two sets of backends: normal and
backup ones. When all normal backends fail, Nginx switches to the backup
set and vice versa.

Oh, and backup backends probably don't work at all with upstream_fair
(never tested, left as a TODO in source).

Best regards,
 Grzegorz Nosek





More information about the nginx mailing list