You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@gmail.com> on 2013/12/01 01:38:50 UTC

Re: Correct way to have a persistent connection between requests?

On Fri, Nov 29, 2013 at 4:13 AM, Kean Johnston <ke...@gmail.com>wrote:

> Hello everyone, I am new to this list and I apologize in advance if this
> is the wrong forum to ask module related questions or if this is a FAQ.
>
> I am writing a module for FastCGI handling(*) that deals solely with
> FastCGI applications over either a local socket or a TCP socket. It will be
> a performance win if the connection between the module and the FastCGI
> application is only created once, not per request. The FastCGI
> specification supports this, as does php-fpm for example. What is the best
> way of doing this? It would be nice if this connection could be lazily
> established (i.e not until it is needed) but if I have to use the child
> hook that wouldn't be a train smash. Obviously in a multi-threaded MPM each
> thread needs its own connection. I also have no experience with the event
> MPM so I don't know if there are any gotchas associated with that.
>
> Any pointers (except NULL) greatly appreciated.
>
> Sincerely,
> Kean
>
> * Yes I am aware of other modules attempting to do the same. mod_fastcgi
> is way out of data and not actively maintained. mod_fcgid also wants to be
> a process manager which not everybody needs (for example php-fpm people
> don't need it at all), and mod_proxy_fcgi relies on the proxy framework,
> which has security implications according to Apache's own docs, and it
> doesn't provide any AAA capabilities.


FWIW, mod_authnz_fcgi in trunk provides AAA over FastCGI.



> My module differs from the aforementioned in that it is *just* about
> managing FastCGI connections, not about process management, and it fully
> integrates with the standard AAA framework in 2.4. It also supports the
> FastCGI "filter" role, which none of the others do AFAICT.
>



-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Re: Correct way to have a persistent connection between requests?

Posted by Jeff Trawick <tr...@gmail.com>.
On Sat, Nov 30, 2013 at 11:24 PM, Kean Johnston <ke...@gmail.com>wrote:

> On 12/1/2013 2:38 AM, Jeff Trawick wrote:
>
>> FWIW, mod_authnz_fcgi in trunk provides AAA over FastCGI.
>>
> Oh! Thank you for that info. I have been using the 2.4.6 tarball source
> only, I will go and look at trunk now.
>
>
In case it looks useful to you:

* You can build mod_authnz_fcgi from trunk with 2.4.7.
* This package includes the necessary bits to build with 2.4.6 or other
recent httpd 2.4.x:
http://emptyhammock.com/downloads/authnz_fcgi-2013-11-12-r1.tar.gz

-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Re: Correct way to have a persistent connection between requests?

Posted by Kean Johnston <ke...@gmail.com>.
On 12/1/2013 2:38 AM, Jeff Trawick wrote:
> FWIW, mod_authnz_fcgi in trunk provides AAA over FastCGI.
Oh! Thank you for that info. I have been using the 2.4.6 tarball source 
only, I will go and look at trunk now.