You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2013/02/26 22:43:57 UTC

[Bug 54101] Socket backend support for mod_proxy

https://issues.apache.org/bugzilla/show_bug.cgi?id=54101

Blaise Tarr <bl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29549|0                           |1
        is obsolete|                            |

--- Comment #1 from Blaise Tarr <bl...@gmail.com> ---
Created attachment 29995
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29995&action=edit
Unix domain socket support for mod_proxy (patch)

I updated my patch to resolve a problem on BSD systems. This patch was
generated against Apache 2.4.4.

Below is my original announcement on the Apache dev mailing list:

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

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org