Balancer Algorithms

Philipp Michels michels at rz.uni-freiburg.de
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 http://wiki.codemongers.com/NginxHttpUpstreamModule

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

--snip--

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

--snap--

so this should work:

upstream  backend  {
    server   backend1.example.com;
    server   backend2.example.com backup;
}

kind regards

Philipp

-- 

*** 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 rz.uni-freiburg.de

PGP-Key: http://omnibus.ruf.uni-freiburg.de/~michels/pubkey.asc
PGP-Fingerprint: 4212 96E7 351E C00D 5506 5B59 EEEE CA1A 9D25 137E






More information about the nginx mailing list