[Catalyst] External FastCGI mode [PATCH]
sam at vilain.net
Mon Oct 31 06:37:29 CET 2005
I have hacked simple support for FastCGI 'external' operation.
Background on the feature;
FastCGI normally works by passing the handler a socket on standard
input, rather than a normal pipe. The application detects this
condition and sets up an accept loop on that socket. The first request
is served and subsequent requests are served over the same socket.
'External' FastCGI mode is where the web application is not started from
the web server. Instead, you start the application server, telling it
where to listen. The web server, instead of calling an external program
itself, just makes a socket connection to the application server
In general, web servers that support FastCGI make this mode of
configuration very simple indeed. For instance, in LiteSpeed or Zeus it
is one dialog with two input fields, and in lighttpd it's a few lines;
fastcgi.server = ( "/path" => ( ( "socket" => "/tmp/socket",
"check-local" => "disable",
) ) )
It is also convenient in many of the same ways that the "HTTP" Engine is
convenient (eg, running from a terminal so you can run it in the
The attached patch lets the helper-supplied appname_fastcgi.pl helper
script specify a socket path to listen on (or :port, or hostname:port),
which is passed to FCGI::OpenSocket(). It can also accept a number of
processes to start, which are managed via FCGI::ProcManager.
In the interests of interoperability, I think this would be a valuable
feature for the default FastCGI handler. However, perhaps it is better
to leave the current FastCGI engine as-is, and make a new one
specifically designed for standalone use.
Opinions or criticisms, anyone?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7099 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051031/ba142a2e/fcgi-external.patch.bin
More information about the Catalyst