 |
|
 |
|
|
 |
Anybody interested in testing patch to allow weighted nodes? |
 |
 |
|
|
05-17-07 12:12 AM
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-
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Anybody interested in testing patch to allow weighted nodes? |
 |
 |
|
|
05-17-07 12:12 AM
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-
>
>
>
>
>
>
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Anybody interested in testing patch to allow weighted nodes? |
 |
 |
|
|
05-17-07 12:12 AM
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:[vbcol=seagreen]
> 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:
>
>
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Anybody interested in testing patch to allow weighted nodes? |
 |
 |
|
|
05-17-07 06:11 AM
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:
>
>
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Anybody interested in testing patch to allow weighted nodes? |
 |
 |
|
|
05-17-07 06:11 AM
On May 16, 2007, at 4:05 PM, 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.
Why not just set the less powerful servers to only allow however many
connections they can deal with?
- ask
--
http://develooper.com/ - http://askask.com/
[ Post a follow-up to this message ]
|
|
|
 |
|
|
|
 |
Re: Anybody interested in testing patch to allow weighted nodes? |
 |
 |
|
|
05-17-07 06:11 AM
On Wed, 16 May 2007, Ask Bj=F8rn Hansen wrote:
>
> On May 16, 2007, at 4:05 PM, Brett G. Durrett wrote:
>
>
> Why not just set the less powerful servers to only allow however many
> connections they can deal with?
Exactly.
[ Post a follow-up to this message ]
|
|
|
 |
|
|
|
 |
Re: Anybody interested in testing patch to allow weighted nodes? |
 |
 |
|
|
05-17-07 06:12 AM
> Why not just set the less powerful servers to only allow however many
> connections they can deal with?
We've considered using a weighted system so that we could send some
small amount of traffic to a particular backend to test out code changes.
Of course, in our case, using a cookie to make sure that chosen users
hit the same server consistently would probably be better.
--Justin
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Anybody interested in testing patch to allow weighted nodes? |
 |
 |
|
|
05-17-07 06:12 AM
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:[vbcol=seagreen]
> Okay, so it won't be what other people expect.
>
>
> On Wed, 16 May 2007, Brett G. Durrett wrote:
>
>
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Anybody interested in testing patch to allow weighted nodes? |
 |
 |
|
|
05-17-07 06:12 AM
On Wed, 16 May 2007, Brett G. Durrett wrote:
> 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.
In my experience, people think they want a weighting mechanism, but they
really, really don't. The load balancer can be much smarter and quicker
to adapt than any human adjusting weights.
Especially modern web apps with widely-varying response times. Perhaps in
the past with all backend nodes serving the same 3 static files, then
statically-defined weighted load balancing might make sense... but still
not really.
I'd need a great reason to include such a feature.
That said, an upcoming change to Perlbal will make weighted requests to
backends a lot easier to implement properly, but I might still fight it,
or at least make it really hard to enable on accident.
- Brad
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Anybody interested in testing patch to allow weighted nodes? |
 |
 |
|
|
05-17-07 12:11 PM
On May 16, 2007, at 10:44 PM, Brett G. Durrett wrote:
> 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.
"Load balancing" is short hand for "give each server an appropriate
load".
If you have two servers, one "twice as powerful" as the other, the
"appropriate load" isn't to send twice as much traffic to the "more
powerful" one.
The appropriate load is to send as much traffic to each server as it
can efficiently handle.
For most applications the primary resource constraint is either
memory or CPU. In either case you figure out how many simultaneous
requests the server can/should handle and set the "maximum concurrent
requests" to that number. Viola, perfect distribution of the traffic.
- ask
--
http://develooper.com/ - http://askask.com/
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
|
Sponsored Links |
 |
 |
|
|
 |
All times are GMT. The time now is 08:03 PM. |
 |
|
|
 |
|
 |
|
|
 |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
|
|
|
|
Medical and Health forum | Computer Games Reviews | Graphics design forum
|
 |
|
 |
|