Hi dev, I'd like to suggest to following changes / offer feedback for mod_fcgid:
(1) mod_fcgid should be capable of specifying an external FCGI server. Assume a scenario where the backend FCGI server (e.g. PHP with php-fpm) runs for security considerations prespawned on a separate machine with a firewall only letting FCGI traffic through. This is possible with mod_proxy_fcgi or mod_fastcgi (with mod_proxy_fcgi only being in trunk and mod_fastcgi kinda outdated). (2) In conjunction with (1), mod_fcgid should be able to select the backend server based on request data. Current, this kind of behaviour is possible with mod_proxy and mod_proxy_fcgi using either interpolated environment variables and/or mod_rewrite with the [P] suffix in a RewriteRule. Unfortunately mod_proxy_fcgi currently exists only in trunk, seems to be kind of abandoned and has some bugs (I filed two bug reports in BZ under 48272 and 48273). As mod_fcgid seems to be the current "weapon of choice", it would be great to have this feature(s) in mod_fcgid (or mod_proxy_fcgi fixed otherwise). Admittedly I have a urgent need for this feature in a production environment. If this feature can't be implemented (respectivly fixed) in the near future (which can I fully understand as a software developer), what would be your suggestion to get an Apache running this way? I'd really hate it to abandon Apache because of this (and am willing to do something against it as far as I still have time in my current project) (3) mod_fcgid currently buffers the complete input from the client (occasionaly in a temp-file if the request is large) before it passes it through to a FCGI backend. Could this be made configurable in a way like File|Memory|Pipeline? (file - as is | memory - buffer in memory always | pipeline - directly pass the read data to the backend) Or otherwise, can someone explain the details to me why it is as it is? Especially in terms of not pipeling data directly (maybe after a little buffering to build proper FCGI packets)? The comment in fcgid_bridge.c:452 (add_request_body) left me clueless. Why would this keep the server in processing too long? Processing takes its time either way, I'd assume. Looking forward to enlightment. :) (4) Would it make sense to use the FCGI feature to multiplex several requests over a single connection? Does any backend support this feature anyway? When thinking of an external FCGI backend with a socket connection and very high Requests/s, this could keep open connections and used/available ports much lower. Really looking forward to your comments. Regards, Edgar Frank
