Anybody interested in testing patch to allow weighted nodes?
Brett G. Durrett
brett at imvu.com
Thu May 17 05:44:32 UTC 2007
Yeah, you're right... I think people will probably expect what you
expected, a per-request weight. I should have been more clear about the
"weighting" mechanism. Like I said, my preference would be on a per
request weight but this was a quick hack that looks like it meets our
specific needs.
To get more feedback and possibly influence a revised patch... I assume
people are achieving weighting by limiting the connections at the web
server level... does this just work for everybody or is there a
preference for controlling the weighting via perlbal? Controlling
weighting at the load balancer level seems like a common expectation
(granted, with a per-request level of control) but maybe I am thinking
about this the wrong way.
So my question to this mailing list is... does the perlbal community
see any value in having a weighting mechanism? If the answer is no, I
would love to hear how you are achieving the same effect and why your
solution is your preferred mechanism.
Thanks in advance for any constructive feedback,
B-
Brad Fitzpatrick wrote:
> Okay, so it won't be what other people expect.
>
>
> On Wed, 16 May 2007, Brett G. Durrett wrote:
>
>
>> Actually, that is what I thought it would do :)
>>
>> My preference would have been to have it be on each request but we are
>> running enough perlbals and have enough traffic that the reduced new
>> connections should have an impact (we have about 20+ perlbals for this
>> service and they create new connections with reasonable frequency, even
>> with back-end keepalives on).
>>
>> I am not sure this would be valuable for light traffic... in my initial
>> testing connections favored (and stuck) to super high weights and would
>> sometime stick with a lower weight, once picked.
>>
>> B-
>>
>> Brad Fitzpatrick wrote:
>>
>>> I don't think this would do what you think it would.
>>>
>>> This would just be for allocating new connections (which is kinda
>>> boring, and happens relatively rarely, and still only one
>>> per-node-in-flight), not for how requests are actually assigned to
>>> backends.
>>>
>>>
>>> On Wed, 16 May 2007, Brett G. Durrett wrote:
>>>
>>>
>>>
>>>> I have attached a patch to 1.57 that will allow weighting of nodes
>>>> specified in a nodefile. This might be handy if your servers have a
>>>> wide range of performance and you want to direct less traffic to less
>>>> powerful servers.
>>>>
>>>> I am putting this out in case anybody has use for it and is willing to
>>>> test it :)
>>>>
>>>> Some notes:
>>>>
>>>> - It only works using nodefiles, not the config file node definitions or
>>>> the configuration interface "add" or "remove" commands.
>>>> - I am running about 5% of our traffic through my production test
>>>> server... it appears to be working well but I would not feel comfortable
>>>> asking others to try it in production. I have done very little
>>>> testing... I am not sure about the behavior in failure cases, especially
>>>> in regards to failing-out bad nodes.
>>>>
>>>> - To weight a node, add whitespace and weight:<int> to the nodefile...
>>>> for example:
>>>>
>>>> 10.10.10.78 weight:1
>>>> 10.10.10.79 weight:1
>>>> 10.10.10.124 weight:5
>>>> 10.10.10.125 weight:5
>>>>
>>>> - If you do not specify a weight for any node the weighting code is
>>>> ignored.
>>>> - If you specify a weight for some (but not all) nodes, it will assume a
>>>> weight of "1" for nodes that did not have a weight.
>>>> - If weights are assigned, the "show pool <pool>" command will add the
>>>> weights of all nodes to the output... if you did not use weighting, the
>>>> standard output will be displayed. For example:
>>>>
>>>> show pool virtual_web
>>>> 10.10.10.78:80 765 weight:1
>>>> 10.10.10.79:80 770 weight:1
>>>> 10.10.10.124:80 4007 weight:5
>>>> 10.10.10.125:80 3921 weight:5
>>>>
>>>> Again, this was a quick hack and I am providing this for testing... if
>>>> your Perlbal is controlling a nuclear reactor, please don't try this.
>>>>
>>>> Thanks in advance for any testing / feedback you can provide,
>>>>
>>>> B-
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>
More information about the perlbal
mailing list