Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 6238 invoked from network); 8 Oct 2008 20:08:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Oct 2008 20:08:38 -0000 Received: (qmail 42462 invoked by uid 500); 8 Oct 2008 20:08:35 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 42386 invoked by uid 500); 8 Oct 2008 20:08:35 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 42377 invoked by uid 99); 8 Oct 2008 20:08:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2008 13:08:35 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_SECURITYSAGE X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 08 Oct 2008 20:07:39 +0000 Received: (qmail 6221 invoked by uid 2161); 8 Oct 2008 20:08:15 -0000 Received: from [192.168.2.4] (euler.heimnetz.de [192.168.2.4]) by cerberus.heimnetz.de (Postfix on SuSE Linux 7.0 (i386)) with ESMTP id 212871721C for ; Wed, 8 Oct 2008 22:08:04 +0200 (CEST) Message-ID: <48ED1332.7040401@apache.org> Date: Wed, 08 Oct 2008 22:08:18 +0200 From: Ruediger Pluem User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17) Gecko/20080829 SeaMonkey/1.1.12 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: load balancer workers References: <14ee094e0810081254u452891feq66f264b8f11902dc@mail.gmail.com> In-Reply-To: <14ee094e0810081254u452891feq66f264b8f11902dc@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org 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 runtime. BTW: What is the goal that rises the need for you to change the assignment of workers to balancers during runtime? Regards R�diger