You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jim Jagielski <ji...@jaguNET.com> on 2005/08/10 17:16:33 UTC

proxy balancer rework

I've never been all that happy with the current setup in having
load balance methods be so hard coded into the proxy module. Adding
another method requires too many changes.

So I've refactored those sections to allow for additional
lb methods to be added via simple submodules.

Prelim Patch is available via:

   http://people.apache.org/~jim/proxy_balancer.patch

and I'll be folding into 2.1/2.3 TRUNK soon.

Re: proxy balancer rework

Posted by Mladen Turk <mt...@apache.org>.
Jim Jagielski wrote:
>> Jim Jagielski wrote:
>>
> 
> I don't know what you mean...

Well, IMO if there is a need for a new balancer
one should write a new balancer module.

Right now we have both API and functionality
inside mod_proxy that enables one to do that.

If we start adding hooks to the balancer 'sub module'
we'll end up with the module for the sub module :)

Anyhow, if someone wishes to write a specific
load balancer module there is API for that, so
I don't see why would we need another one.


Regards,
Mladen

Re: proxy balancer rework

Posted by Jim Jagielski <ji...@jaguNET.com>.
On Aug 10, 2005, at 11:24 AM, Mladen Turk wrote:

> Jim Jagielski wrote:
>
>> I've never been all that happy with the current setup in having
>> load balance methods be so hard coded into the proxy module. Adding
>> another method requires too many changes.
>>
>
> Right, but mod_proxy_balancer was not meant to be a generic
> placeholder for 'anything-you-may-ever-wish-to-balance', but
> rather just a module that can be used as reference for additional
> user specific balancer modules.
>
> Of course we can change the point of view, but I'm not sure if
> that would make sense. Perhaps some 'generic, fit-all' functions
> could be copied over to the util.c, as well as management things,
> but OTOH different load balancer may require different balancer
> management functionality.
>

I don't know what you mean... If I am using mod_proxy
with the balancer and I wish to add in a different
lb method, because the 2 bundled with Apache aren't
sufficient, then certainly providing a mechanism
to allow them to easily add such without requiring
code changes to the proxy and balancer modules make
sense. This is what the patch does.

Yeah, some could require substantial changes (proxy_worker_stat
might be too restrictive) but I can envision several that
would fit in quite nicely here. Heck, you could have
one that externally queries cpu utilization, and uses
that to determine the lbfactor, and this patch would
provide a nice framework with little or no impact.
Maybe adding some opaque structs to the worker and
balancer structs may be required later on...

Re: proxy balancer rework

Posted by Mladen Turk <mt...@apache.org>.
Jim Jagielski wrote:
> I've never been all that happy with the current setup in having
> load balance methods be so hard coded into the proxy module. Adding
> another method requires too many changes.
> 

Right, but mod_proxy_balancer was not meant to be a generic
placeholder for 'anything-you-may-ever-wish-to-balance', but
rather just a module that can be used as reference for additional
user specific balancer modules.

Of course we can change the point of view, but I'm not sure if
that would make sense. Perhaps some 'generic, fit-all' functions
could be copied over to the util.c, as well as management things,
but OTOH different load balancer may require different balancer
management functionality.

Regards,
Mladen.