Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 58138 invoked from network); 21 Apr 2010 00:19:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Apr 2010 00:19:07 -0000 Received: (qmail 60225 invoked by uid 500); 21 Apr 2010 00:19:06 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 60151 invoked by uid 500); 21 Apr 2010 00:19:05 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 60144 invoked by uid 99); 21 Apr 2010 00:19:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Apr 2010 00:19:05 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [72.246.2.14] (HELO prod-mail-xrelay02.akamai.com) (72.246.2.14) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Apr 2010 00:18:57 +0000 Received: from prod-mail-xrelay02.akamai.com (localhost [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id 1A6C149E477 for ; Wed, 21 Apr 2010 00:18:36 +0000 (GMT) Received: from prod-mail-relay01.akamai.com (unknown [172.17.50.20]) by prod-mail-xrelay02.akamai.com (Postfix) with ESMTP id 061D949E0B4 for ; Wed, 21 Apr 2010 00:18:36 +0000 (UTC) Received: from usca1ex-fegate1.sanmateo.corp.akamai.com (exchange.sanmateo.corp.akamai.com [172.22.184.21]) by prod-mail-relay01.akamai.com (Postfix) with ESMTP id B7D30226033 for ; Wed, 21 Apr 2010 00:18:35 +0000 (GMT) Received: from CAVS2.sanmateo.corp.akamai.com ([172.22.184.28]) by usca1ex-fegate1.sanmateo.corp.akamai.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 20 Apr 2010 17:18:35 -0700 Received: from 172.22.144.153 ([172.22.144.153]) by CAVS2.sanmateo.corp.akamai.com ([172.22.184.32]) via Exchange Front-End Server exchange.akamai.com ([172.17.34.37]) with Microsoft Exchange Server HTTP-DAV ; Wed, 21 Apr 2010 00:18:34 +0000 User-Agent: Microsoft-Entourage/12.15.0.081119 Date: Tue, 20 Apr 2010 17:18:33 -0700 Subject: non-stop generational modperl config update strategies? From: Jeff McCarrell To: Message-ID: Thread-Topic: non-stop generational modperl config update strategies? Thread-Index: Acrg6C1EwQYN94cvBE2/qUi+utjw1Q== Mime-version: 1.0 Content-type: multipart/alternative; boundary="B_3354628713_19438396" X-OriginalArrivalTime: 21 Apr 2010 00:18:35.0051 (UTC) FILETIME=[2E7DC7B0:01CAE0E8] X-Virus-Checked: Checked by ClamAV on apache.org > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3354628713_19438396 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Hello modperl-folk: In a nutshell: I would like to ask the community for pointers on how to evolve our successfully deployed application which gets restarted once / hour to reload configuration state to a model where it is continuously running. Background: We have a long-successfully-deployed mp2 application that has to scale well= . Our clusters are currently fronted by hardware load balancers. To effect a configuration change, which is currently done hourly, a process removes a cluster slave host from the hardware load balancers rotation, pushes the new config state down to the slave, and restarts apache2. After apache2 restarts, the mgmt process puts that host back into the load balancer rotation. We are running the prefork MPM with 32-512 httpd children on fairly beefy linux boxes with 4 =AD 8 cores each using the standard unix copy-on-write model: load the config state into perl data structures in the parent once via a PerlPostConfigHandler then fork as many children as the prefork MPM decides it needs to handle th= e load. The configuration pushes are scheduled via wall clock time; currently it is deterministic when a configuration change will be fully propagated. All configuration changes are pushed to all slaves. There are currently a few hundred slaves covering most of North America. This model has worked and is working fairly well for us to date. However, the clock-work nature of our scheme ultimately limits our scalability. And in thinking about what it would take to overcome our current limitations, I would like to be able to reload the configuration state from new data without an apache restart. Put another way, I would like to be able to load next generation configuration state into new httpd children, then kill off the previous generation as they complete their current requests, and start using the new instances, all while servicing requests, albeit at perhaps a reduced rate while the configuration state is being swapped. =20 I don=B9t know how to do this in the prefork MPM; and what I am proposing more-or-less breaks the load-parent / fork model. The size of the configuration data are not too large: lets say 10Meg or so, but large enough that I prefer models that share this state among all httpd children. At this point, I'd be willing to consider other MPMs if they help me get there. I am willing to trade memory and CPU to achieve a non-stop apache instance. So modperl experts: any pointers on prior art here? I'd love to hear about strategies that have been shown to work in real life= . TIA, -- jeff --B_3354628713_19438396 Content-type: text/html; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable non-stop generational modperl config update strategies? Hello modperl-folk:

In a nutshell: I would like to ask the community for pointers on how to evo= lve our successfully
deployed application which gets restarted once / hour to reload configurati= on state
to a model where it is continuously running.

Background:
We have a long-successfully-deployed mp2 application that has to scale well= .
Our clusters are currently fronted by hardware load balancers.
To effect a configuration change, which is currently done hourly,
a process removes a cluster slave host from the hardware load balancers rot= ation,
pushes the new config state down to the slave,
and restarts apache2.
After apache2 restarts, the mgmt process puts that host back into the load = balancer rotation.

We are running the prefork MPM with 32-512 httpd children on fairly beefy l= inux boxes with 4 – 8 cores each
using the standard unix copy-on-write model:
load the config state into perl data structures in the parent once via a Pe= rlPostConfigHandler
then fork as many children as the prefork MPM decides it needs to handle th= e load.
The configuration pushes are scheduled via wall clock time;
currently it is deterministic when a configuration change will be fully pro= pagated.
All configuration changes are pushed to all slaves.
There are currently a few hundred slaves covering most of North America. This model has worked and is working fairly well for us to date.

However, the clock-work nature of our scheme ultimately limits our scalabil= ity.
And in thinking about what it would take to overcome our current limitation= s,
I would like to be able to reload the configuration state from new data wit= hout an apache restart.
Put another way, I would like to be able to load next generation configurat= ion state into new httpd children,
then kill off the previous generation as they complete their current reques= ts,
and start using the new instances, all while servicing requests,
albeit at perhaps a reduced rate while the configuration state is being swa= pped.
 
I don’t know how to do this in the prefork MPM;
and what I am proposing more-or-less breaks the load-parent / fork model.
The size of the configuration data are not too large: lets say 10Meg or so,=
but large enough that I prefer models that share this state among all httpd= children.

At this point, I'd be willing to consider other MPMs if they help me get th= ere.
I am willing to trade memory and CPU to achieve a non-stop apache instance.=

So modperl experts: any pointers on prior art here?
I'd love to hear about strategies that have been shown to work in real life= .


TIA,

-- jeff
--B_3354628713_19438396--