CGI 和 FastCGI

CGI (Common Gateway Interface, Common Gateway Interface) is a standard protocol that can interact to support communication between an application and a Web browser. CGI first appeared in 1993, all versions of IIS provides support for CGI. When running CGI on IIS, there are some problems CGI processing requests. For each new request to CGI application processing, IIS must create a new process, after the completion of the process of implementation, and then shuts down the process. IIS request can be processed quickly, however, to start and stop the process overhead can become a performance bottleneck, and this is when running on IIS CGI, CGI request processing existing modalities. Therefore, IIS introduces a FastCGI. FastCGI can partially solve the above performance bottlenecks.

FastCGI (C: \ Windows \ System32 \ inetsrv \ iisfcgi.dll) is a new version of the CGI, CGI can meet most of the original specification. However, FastCGI process does not shut down when a request is processed, but to make this process continues to run, and handle other requests. And similar CGI, FastCGI is single-threaded, but compared to the CGI, when using FastCGI, the server can handle more requests, because the process is still in an open state. In IIS 7.0, FastCGI API is implemented using the built-in, and the machine is implemented as a module.

Why use FastCGI it? This is because there are still a large number of PHP applications, these applications have been widely used. Although these applications typically use a CGI version or ISAPI version of PHP, however, FastCGI can further improve the operating performance of these applications.

Because FastCGI is a single-threaded application, and therefore must start multiple threads to process multiple requests. These processes can be aggregated to a process pool, composed of different groups of processes, so that we can process the unified management of these groups. A process attribute group may be hosted, for example, the number of processes requested quantity a process group, and a process that can be processed prior to recovery, processes belong to the group of attributes, and can be managed by. A process group can contain multiple processes, FastCGI can also run multiple processes simultaneously groups, and each process group can have its own settings.

Guess you like

Origin blog.51cto.com/2612012/2405994