What mode of FastCGI server should I choose under Apache?

I am new to FastCGI and want to use this platform to speed up my existing vanilla CGI (perl) programs.

However, when reading the FastCGI / Apache FAQ , I can configure my scripts (after converting to separate initialization / request sections) in the Apache configuration as one of the following:

1) dynamic

2) static "inside the SetHandler frame"

3) static "inside the AddHandler scope"

4) static "outside the scope of Set / AddHandler" (or, I think, it can be called "external")

I got confused in these 4 options, and I assume that by default β€œdynamic” is what I should go with, but can anyone explain the pros and cons of this data?

+4
source share
1 answer

Don't worry about Add / SetHandlers. This is just a way to determine which extensions should be recognized as fcgi scripts.

What you can consider is dynamic, static, or external.

  • Static starts when apache starts (perhaps this is the most common setting)
  • Dynamic starts whenever the first request is executed (this is the default value)
  • External requires the fcgi server to run separately from apache. (This is the most advanced configuration)

I suggest you refer to the module documentation for more information (at least a summary):

FastCGI applications in mod_fastcgi are defined as one of three types: static, dynamic, or external. They are configured using FastCgiServer, FastCgiConfig and FastCgiExternalServer respectively. Any URI that Apache identifies as a FastCGI application and that is not explicitly configured using FastCgiServer or the FastCgiExternalServer directive is treated as a dynamic application (see the FastCgiConfig directive for more information).

Static and dynamic FastCGI applications are generated and managed by FastCGI Process Manager, fcgi-pm. A process manager is generated by Apache during server initialization. It is assumed that external applications are launched and managed independently.

Of course, if you use Perl, you can try mod_perl, where you can start by using your CGI scripts first .

+5
source

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


All Articles