You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ruediger Pluem <rp...@apache.org> on 2006/07/09 00:53:19 UTC

[Fwd: Re: proxy_worker_stat in mod_proxy]

On 08.07.2006 20:37, Jean-frederic Clere wrote:
> Hi,
> 
> I am looking in mod_proxy and I think that proxy_worker_stat of
> proxy_worker should be replaced by some void * to allow to write new
> balancers.
> The idea is each worker needs to point to the view the balancer of its,
> but only the balancer needs to know the structure it needs to make the
> balancing.
> 
> Comments?

That is not complety true with the current code. Other parts of the code depend
on this structure too (like the generic balancer code and several things in
proxy_util.c). So I don't think we should do that. OTH you are correct that new
balancers might need additional data. So it makes sense from my perspective to
add a void pointer *to* the proxy_worker_stat structure to enable
balancers to store custom data that is private to them. Of course we must take
care in this case that the same worker is not used by different balancers.
This would result in data corruption. In this case some sort of table would
be better where each balancer provider could use its name to get its data
pointer from the table.

Regards

RĂ¼diger