httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <>
Subject Re: load balancer workers
Date Wed, 08 Oct 2008 20:08:18 GMT

On 10/08/2008 09:54 PM, Vinicius Petrucci wrote:
> hi,
> I'm writing a module that needs to modify the elements (workers) of
> load balancers. That is, to move workers between different balancers.
> for example, suppose we have two balancers b1 and b2.  also, we have a
> worker "w"  to be moved from "b1" to "b2"
> basically, I do a push in "b2->workers" array:
> new_worker = apr_array_push(b2->workers);
> memcpy(new_worker, w, sizeof(proxy_worker));
> then, I decrement by one the elements from "b1" --- we still need to guarantee
> that the positions of "b1->workers" array  are fixed (shifted):
> proxy_worker *tmp_w = w++;
> for (j = i; j < b1->workers->nelts-1; j++, tmp_w = w, w++) {
>    memcpy(tmp_w, w, sizeof(proxy_worker));
> }
> b1->workers->nelts--;
> the problem is that in my module these changes are made. but when I
> use the balancer-manager interface to list the balancer and respective
> workers' settings, nothing has changed. this information isn't shared between
> the modules?

Correct. So you cannot change the assignment of workers to a balancer during
BTW: What is the goal that rises the need for you to change the assignment
of workers to balancers during runtime?



View raw message