Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 39421 invoked from network); 8 Apr 2006 02:51:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Apr 2006 02:51:57 -0000 Received: (qmail 50190 invoked by uid 500); 8 Apr 2006 02:51:52 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 50169 invoked by uid 500); 8 Apr 2006 02:51:51 -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 50158 invoked by uid 99); 8 Apr 2006 02:51:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Apr 2006 19:51:51 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 209.86.89.69 is neither permitted nor denied by domain of perrin@elem.com) Received: from [209.86.89.69] (HELO elasmtp-mealy.atl.sa.earthlink.net) (209.86.89.69) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Apr 2006 19:51:51 -0700 Received: from [67.100.49.68] (helo=[192.168.1.100]) by elasmtp-mealy.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1FS3Xt-0005jR-Qp; Fri, 07 Apr 2006 22:51:29 -0400 Subject: Re: anyone with pgpool experience? From: Perrin Harkins To: David Nicol Cc: Jonathan Vanasco , modperl List In-Reply-To: <934f64a20604071916x26bf42b9x450576592ce8727e@mail.gmail.com> References: <58F7E9DA-692F-47CD-9346-31B411BB6D31@2xlp.com> <1144454638.10995.2.camel@localhost.localdomain> <934f64a20604071859p16c9e8e8m8e5fb9398692b738@mail.gmail.com> <1144461945.10995.17.camel@localhost.localdomain> <934f64a20604071916x26bf42b9x450576592ce8727e@mail.gmail.com> Content-Type: text/plain Date: Fri, 07 Apr 2006 22:51:28 -0400 Message-Id: <1144464688.10995.31.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 (2.6.0-1) Content-Transfer-Encoding: 7bit X-ELNK-Trace: c0887ac1ba12fd211aa676d7e74259b7b3291a7d08dfec791c918efe416bb4595fdaf04748100be0350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 67.100.49.68 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Fri, 2006-04-07 at 21:16 -0500, David Nicol wrote: > When I was trying to multiplex a single database connection to a > room ful of clients that combination was reccommended to me by people > on the DBI list. I suspect most of them have never tried it. It's a solution for accessing a database that has no client available on your platform, but it's not efficient. It doesn't even keep the connections to the database persistent, and every client connection still needs a separate process. Writing a pooling server that works as a proxy for all DBD's is pretty hard, since they all have different client libraries and protocols. A non-blocking I/O approach would probably work great, but you'd need non-blocking client libraries for all the databases. > If I was to write a DBI multiplexer that simply serialized requests in order > I would hope I was working against a database that could have multiple > open result streams at once I'm not sure where the idea of serializing requests came from, but that's not going to be a viable solution for anyone with significant traffic. All of the popular databases handle parallel requests very well. If you run a proxy server in front of mod_perl, there's typically no need to worry about pooling. Apache does a good job of managing how many mod_perl processes are running, and ones that don't hit mod_perl will not tie up database connections. The only exception is when you have mod_perl handlers that do a lot of work but don't need a database connection. Those could be isolated on a separate mod_perl server if necessary. - Perrin