Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 71603 invoked from network); 8 Apr 2010 07:59:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Apr 2010 07:59:30 -0000 Received: (qmail 17208 invoked by uid 500); 8 Apr 2010 07:59:29 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 17119 invoked by uid 500); 8 Apr 2010 07:59:29 -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 17107 invoked by uid 99); 8 Apr 2010 07:59:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Apr 2010 07:59:28 +0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=AWL,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jfclere@gmail.com designates 209.85.212.45 as permitted sender) Received: from [209.85.212.45] (HELO mail-vw0-f45.google.com) (209.85.212.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Apr 2010 07:59:21 +0000 Received: by vws8 with SMTP id 8so812583vws.18 for ; Thu, 08 Apr 2010 00:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=TQ2JB9vA6mfpS8nLp7aMdU0BElmpHFQb4osXMPs5iWI=; b=bQsoD+UhM47mI4mDVDiD7cIUcpZadl6vXR7uDV3ZZvbhppOm78MtjLTyKQUTHc/S45 QNE0cDgOSMGpMHVnh6JDoeVisbOFURMd4/7yYIk3dPl5e49UZrlg3Z4HAtU1+KOipQqD IZXXLYoFQWHvPR4AJrtAJp9c6uVLt5CwcEMZw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=HH0MhNfoJcFXhr/pTkR5lVLYUG7FfEfrXopzyA/dUMPImRwTHyUXbl1kdYxywG67uf VhwPad8s3Q7DOsWk+JuiPtdaw3CmSoB/L7f6leKJZKadNOVvnIObKwoS5tVVQLXmF9/N eZbo5hsQNq96446dECD2CTRhcqzIgcoMb6MjE= Received: by 10.220.88.81 with SMTP id z17mr5015627vcl.34.1270713540147; Thu, 08 Apr 2010 00:59:00 -0700 (PDT) Received: from [192.168.1.34] (61.Red-193-152-156.dynamicIP.rima-tde.net [193.152.156.61]) by mx.google.com with ESMTPS id 33sm92924469vws.10.2010.04.08.00.58.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 08 Apr 2010 00:58:57 -0700 (PDT) Message-ID: <4BBD8CBD.3070200@gmail.com> Date: Thu, 08 Apr 2010 09:58:53 +0200 From: jean-frederic clere User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: Arranging mod_proxy_balancer in trunk References: <4BBC8937.3090506@gmail.com> <99EA83DCDE961346AFA9B5EC33FEC08B03B4237E@VF-MBX11.internal.vodafone.com> In-Reply-To: <99EA83DCDE961346AFA9B5EC33FEC08B03B4237E@VF-MBX11.internal.vodafone.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit On 04/07/2010 03:40 PM, "Pl�m, R�diger, VF-Group" wrote: > > >> -----Original Message----- >> From: jean-frederic clere [mailto:jfclere@gmail.com] >> Sent: Mittwoch, 7. April 2010 15:32 >> To: dev@httpd.apache.org >> Subject: Arranging mod_proxy_balancer in trunk >> >> Hi, >> >> In mod_proxy_balancer after >> runtime = find_session_route(*balancer, r, &route, &sticky, url); >> >> There is a logic that belongs to the LB implementation, my >> idea is to add a >> apr_status_t (*updatelbstatus)(proxy_balancer *balancer, proxy_worker >> *elected, server_rec *s); >> in the proxy_balancer_method (mod_proxy.h) and call the LB >> implementation. >> >> Comments? > > You are talking about replacing this > > int i, total_factor = 0; > proxy_worker **workers; > /* We have a sticky load balancer > * Update the workers status > * so that even session routes get > * into account. > */ > workers = (proxy_worker **)(*balancer)->workers->elts; > for (i = 0; i < (*balancer)->workers->nelts; i++) { > /* Take into calculation only the workers that are > * not in error state or not disabled. > * > * TODO: Abstract the below, since this is dependent > * on the LB implementation > */ > if (PROXY_WORKER_IS_USABLE(*workers)) { > (*workers)->s->lbstatus += (*workers)->s->lbfactor; > total_factor += (*workers)->s->lbfactor; > } > workers++; > } > runtime->s->lbstatus -= total_factor; > runtime->s->elected++; > > *worker = runtime; > > > with > > apr_status_t (*updatelbstatus)(proxy_balancer *balancer, proxy_worker > *elected, server_rec *s); > > , correct? Yes :-) Cheers Jean-Frederic