illustrate
1. It is a protocol that allows interactive programs to communicate with Web servers. FastCGI is an enhanced version of the earlier Common Gateway Interface (CGI).
2. Committed to reducing the cost of interaction between web servers and CGI programs, so that the server can handle more web page requests at the same time.
principle
After the FastCGI process manager is started, it first parses the php.ini file, initializes the execution environment, and then starts multiple CGI protocol interpreter daemon processes (multiple php-cig or php-cgi.exe can be seen in the process management), Waiting for the connection of the WEB server; when the client requests to reach the WEB server, the FastCGI process manager will select and connect to a CGI interpreter, and the WEB server will send the CGI environment variables and standard input to the FastCGI sub-process php-cgi; php After the -cgi subprocess is processed, return the standard output and error information to the WEB server; at this time, the php-cgi subprocess will close the connection, this request will be closed, and then continue to wait and process the next request connection from the FastCGI process manager.
The above is the understanding of php FastCGI mode, I hope it will be helpful to everyone.