Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9401091AB for ; Thu, 2 Aug 2012 14:08:02 +0000 (UTC) Received: (qmail 92250 invoked by uid 500); 2 Aug 2012 14:08:01 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 92175 invoked by uid 500); 2 Aug 2012 14:08:01 -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 92167 invoked by uid 99); 2 Aug 2012 14:08:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 14:08:01 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 76.96.59.228 is neither permitted nor denied by domain of jim@jagunet.com) Received: from [76.96.59.228] (HELO qmta15.westchester.pa.mail.comcast.net) (76.96.59.228) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 14:07:54 +0000 Received: from omta14.westchester.pa.mail.comcast.net ([76.96.62.60]) by qmta15.westchester.pa.mail.comcast.net with comcast id hnCQ1j0011HzFnQ5Fq7lXM; Thu, 02 Aug 2012 14:07:45 +0000 Received: from [192.168.199.10] ([69.251.80.74]) by omta14.westchester.pa.mail.comcast.net with comcast id hq6k1j00Q1cCKD93aq7b8F; Thu, 02 Aug 2012 14:07:35 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1485\)) Subject: Re: [PATCH] mod_proxy Unix domain socket support From: Jim Jagielski In-Reply-To: <20120731200351.GB11038@gmail.com> Date: Thu, 2 Aug 2012 10:07:32 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20120731200351.GB11038@gmail.com> To: dev@httpd.apache.org X-Mailer: Apple Mail (2.1485) X-Virus-Checked: Checked by ClamAV on apache.org Thx for the patch... I'll take a look. On Jul 31, 2012, at 4:06 PM, Blaise Tarr wrote: > Hi, >=20 > The attached patch adds support for Unix domain sockets (UDS) to > mod_proxy. This is very beneficial when configuring a reverse proxy > using mod_proxy_fcgi to connect to PHP-FPM. In some tests with ab > there was over 20% improvement in the request rate when using a UDS > instead of TCP. >=20 > Since remote servers in mod_proxy are configured with a URL, I took > the idea from this page on how to represent a UDS as a URL: > http://daniel.haxx.se/blog/2008/04/14/http-over-unix-domain-sockets/ >=20 > So the host portion of the URL contains "socket=3D" followed by the = URI > encoded socket path (upper case characters must be encoded too). Below > are a couple of examples where PHP-FPM's socket is /tmp/php-fpm.sock > and the document root is /local/htdocs: >=20 > ProxyPass fcgi://socket=3D%2ftmp%2fphp-fpm.sock/local/htdocs/ >=20 > RewriteRule (.*\.php) = fcgi://socket=3D\%2ftmp\%2fphp-fpm.sock/local/htdocs/$1 [P,L] >=20 > The following are not contained in the patch: > * bump MMN due to mod_proxy.h changes > * assign APLOGNO numbers > * detection of AF_UNIX support in configure >=20 > Thanks for your consideration, > Blaise >