httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: [PATCH] mod_proxy Unix domain socket support
Date Thu, 02 Aug 2012 14:07:32 GMT
Thx for the patch... I'll take a look.

On Jul 31, 2012, at 4:06 PM, Blaise Tarr <blaise.tarr@gmail.com> wrote:

> Hi,
> 
> 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.
> 
> 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/
> 
> So the host portion of the URL contains "socket=" 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:
> 
> ProxyPass fcgi://socket=%2ftmp%2fphp-fpm.sock/local/htdocs/
> 
> RewriteRule (.*\.php) fcgi://socket=\%2ftmp\%2fphp-fpm.sock/local/htdocs/$1 [P,L]
> 
> 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
> 
> Thanks for your consideration,
> Blaise
> <proxy-uds.patch>


Mime
View raw message