Balancer Algorithms

Philipp Michels michels at
Thu Nov 20 14:33:30 MSK 2008

Stephen Nelson-Smith schrieb:
> Hello,
> I want to distribute traffic across backend servers based purely on
> *availability*.
> I don't want to send some traffic to one which is less busy, or has
> less traffic, , or has fewer connections, I want to send traffic to a
> second node only if the first node is unavailable.
> How can I do this?
> S.

take a look at

the section "server" describes some options, e.g.


backup - (0.6.7 or later) only uses this server if the non-backup
servers are all down or busy


so this should work:

upstream  backend  {
    server backup;

kind regards



*** ACHTUNG: Meine Telefonnummer hat sich geändert: 203 - 4669 ***

Dipl.-Inf. Philipp Michels
Rechenzentrum Universitaet Freiburg
Stefan-Meier-Str. 31a, 79104 Freiburg
Tel: 0761/203-4669, Fax: 0761/203-4643
E-Mail: michels at

PGP-Fingerprint: 4212 96E7 351E C00D 5506 5B59 EEEE CA1A 9D25 137E

More information about the nginx mailing list