/ Zope / Apsis / Pound Mailing List / Archive / 2004 / 2004-10 / Backend weighting and priorities

[ << ] [ >> ]

[ Q: Pound HTML buffering strategy / "Jesper ... ] [ UTF-8 in certificate subject / Thierry Coopman ... ]

Backend weighting and priorities
Dmitry Dvoinikov <dmitry(at)targeted.org>
2004-10-25 05:43:34 [ SNIP ]
Dear list,

Is there a way to tell Pound to use backend server1 whenever
it's available, then server2, but only when server1 is dead,
then server3, but only when the first two are dead and so on ?
Even better, in the similar situations use servers "server1x",
then "server2x" etc. If not, is there other simple way to have
a hot standby server ?

The doc for that is rather cryptic:

BackEnd address,port,priority[,ha_port]
Specify a backend server: address and port. Priority is 1  to  9
and  defines a weighting - higher priority servers get used more
often.

But what does that "more often" mean and how is it measured ?

Sincerely,
Dmitry Dvoinikov
http://www.targeted.org/


Re: Backend weighting and priorities
Dmitry Dvoinikov <dmitry(at)targeted.org>
2004-10-25 06:31:35 [ SNIP ]
Ok, I've found the answers:

> If not, is there other simple way to have
> a hot standby server ?

> Robert Segall wrote:
>> The simplest way is to define the "reserve" server with an HA port:
>> 
>> URLGroup ".*"
>> BackEnd main.server,80,1
>> BackEnd spare.server,80,1,9080
>> EndGroup
>> 
>> Make sure nothing listens on spare.server:9080. Start something that accepts

>> connections on it only when your main.server goes down (use your normal 
>> monitoring for that).
>> 
>> In general I agree that it doesn't make much sense to have unused servers -
if 
>> they are good for hot back-up then they are also good enough for load 
>> balancing.

The last sentence is not true in my case though - I have two servers,
each beaing a database, only one has a live replica, and the other
(which also has other uses) has a bit outdated backup one and I want
it to pick up only if the primary server goes down.

> But what does that "more often" mean and how is it measured ?

From svc.c it looks like a host with priority N gets selected
with probability 1/rand()%N

Sincerely,
Dmitry Dvoinikov
http://www.targeted.org/

--- Original message follows ---

> Dear list,

> Is there a way to tell Pound to use backend server1 whenever
> it's available, then server2, but only when server1 is dead,
> then server3, but only when the first two are dead and so on ?
> Even better, in the similar situations use servers "server1x",
> then "server2x" etc. If not, is there other simple way to have
> a hot standby server ?

> The doc for that is rather cryptic:

> BackEnd address,port,priority[,ha_port]
> Specify a backend server: address and port. Priority is 1  to  9
> and  defines a weighting - higher priority servers get used more
> often.

> But what does that "more often" mean and how is it measured ?

> Sincerely,
> Dmitry Dvoinikov
> http://www.targeted.org/


Re[2]: Backend weighting and priorities
Dmitry Dvoinikov <dmitry(at)targeted.org>
2004-10-25 06:34:11 [ SNIP ]
> with probability 1/rand()%N

1/N

Sincerely,
Dmitry Dvoinikov
http://www.targeted.org/

--- Original message follows ---

> Ok, I've found the answers:

>> If not, is there other simple way to have
>> a hot standby server ?

>> Robert Segall wrote:
>>> The simplest way is to define the "reserve" server with an HA port:
>>> 
>>> URLGroup ".*"
>>> BackEnd main.server,80,1
>>> BackEnd spare.server,80,1,9080
>>> EndGroup
>>> 
>>> Make sure nothing listens on spare.server:9080. Start something that
accepts
>>> connections on it only when your main.server goes down (use your normal
>>> monitoring for that).
>>> 
>>> In general I agree that it doesn't make much sense to have unused servers -
if
>>> they are good for hot back-up then they are also good enough for load
>>> balancing.

> The last sentence is not true in my case though - I have two servers,
> each beaing a database, only one has a live replica, and the other
> (which also has other uses) has a bit outdated backup one and I want
> it to pick up only if the primary server goes down.

>> But what does that "more often" mean and how is it measured ?

> From svc.c it looks like a host with priority N gets selected
> with probability 1/rand()%N

> Sincerely,
> Dmitry Dvoinikov
> http://www.targeted.org/

> --- Original message follows ---

>> Dear list,

>> Is there a way to tell Pound to use backend server1 whenever
>> it's available, then server2, but only when server1 is dead,
>> then server3, but only when the first two are dead and so on ?
>> Even better, in the similar situations use servers "server1x",
>> then "server2x" etc. If not, is there other simple way to have
>> a hot standby server ?

>> The doc for that is rather cryptic:

>> BackEnd address,port,priority[,ha_port]
>> Specify a backend server: address and port. Priority is 1  to  9
>> and  defines a weighting - higher priority servers get used more
>> often.

>> But what does that "more often" mean and how is it measured ?

>> Sincerely,
>> Dmitry Dvoinikov
>> http://www.targeted.org/


MailBoxer