/ Zope / Apsis / Pound Mailing List / Archive / 2005 / 2005-12 / Re: [Pound Mailing List] Simple Load Balancing 2.0 Config

[ << ] [ >> ]

[ Simple Load Balancing 2.0 Config / Eric McCarthy ... ] [ Status on starving a backend? / "Silvio ... ]

Re: [Pound Mailing List] Simple Load Balancing 2.0 Config
Robert Segall <roseg(at)apsis.ch>
2005-12-01 09:42:11 [ FULL ]
Thanks for the info. Nasty one - somehow slipped through the cracks.

As a temporary fix, in svc.c (about line 550) change the function
rand_backend() as follows:

static BACKEND *
rand_backend(BACKEND *be, int pri)
{
    while(be) {
>>>     if(!be->alive) {                <<< just add the
brace!
>>>         be = be->next;              <<< add this line!
            continue;
>>>     }                               <<< add this line!
        if((pri -= be->priority) <= 0)
            break;
>>>     be = be->next;                  <<< add this line!
    }
    return be;
}

It should hopefully fix all the problems you describe. This goes into
the next official beta.[...]

Re: [Pound Mailing List] Simple Load Balancing 2.0 Config
Eric McCarthy <eric(at)desert.net>
2005-12-03 01:15:06 [ FULL ]
Yes, that fixed it! Now on to the next bug. :-)

When no priorities are given to the back-ends (or both set to 1), the  
first back-end in the config still gets all the traffic.

I'm fairly certain the patch to this is to change this line in  
rand_backend():

     if((pri -= be->priority) <= 0)

to

     if((pri -= be->priority) < 0)

This fixes the problem for me, and also seems to make sense in the code.

PS This method of choosing the back-end is much improved over 1.x,  
and as far as I can tell won't have the bug I brought up in the  
"Distributing the Load of a Failed Backend" thread. Yay!

Thanks!
-Eric


On Dec 1, 2005, at 1:42 AM, Robert Segall wrote:
[...]
>>>>     if(!be->alive) {                <<< just add
the brace!
>>>>         be = be->next;              <<< add this
line![...]
>>>>     }                               <<< add this
line![...]
>>>>     be = be->next;                  <<< add this
line![...]

Re: [Pound Mailing List] Pound 2.x status
Robert Segall <roseg(at)apsis.ch>
2005-12-12 12:56:38 [ FULL ]
On Sat, 2005-12-10 at 15:53 +1100, Tom Pike wrote:[...]

The 1.x series is pretty much EOL. I suggest you go with 2.0, which will
be released as soon as we can iron out all the bugs.

You may also want to tell us a bit more about what changes you want -
some of them may be planned anyway, so we could both save some effort.[...]

MailBoxer