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. 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.

Reply via email to