Fcgi vs mod_fastcgi on Apache server

I have an apache server in which I configure fcgi . I was wondering if I needed to configure the created mod_fastcgi tailor or the plain old cgi-fcgi .

mod-fastcgi doesn't seem to support the fcgi โ€œmultiplexingโ€ fcgi , and the web service I create is a very high traffic service with a few thousand calls per minute, and I want them to be processed as quickly as possible.

Any suggestions or tips

+6
source share
1 answer

Indeed, mod_fastcgi does not support multiplexing. I suppose this is because the Apache web server handles concurrent processing. You have probably already considered various multimodeling models (MPM) ...

Apache is optimized around several (request) phases. Various modules can be connected wherever you want, which makes Apache an excellent server for directly integrating high-performance and / or really complex applications (for example, with custom modules in c , mod_perl , etc.) as the modules themselves, But both, mod_fastcgi and cgi-fcgi are cgi-fcgi that are used only to provide a response handler and / or filter. Thus, many of the great features (configuration, matching, logging, and cleanup after request ...) that come with Apache are simply not used in that setup.

Thus; if your application is built on top of FGCI, I would not recommend using Apache. Especially for high-performance applications under high load; You might prefer a lighter but faster HTTP daemon. There are many alternatives, such as nginx or lighttpd . Typically, they can be used as a proxy / balancer for FCGI processes, cache, SSL handler and logging provider. Of course, Apache is also capable of performing these tasks, but it's kind of like using a helicopter to direct traffic at the crossroads ...

Hurrah!

+4
source

Source: https://habr.com/ru/post/916968/


All Articles