CGI (Common Gateway Interface) mode
When a client requests dynamic content from the Web server, the dynamic file needs to be processed by a CGI-initiated stand-alone process, the PHP interpreter. The PHP parser parses the php.ini. xml file, initializes the execution environment, then processes the request, returns the processed results in a CGI-formatted format, and finally exits the process, and the Web server returns the results back to the client. This is basically not the way, because for each dynamic request to start the CGI process, and each time to resolve the php.ini and initialize the execution environment, processing the request after the destruction process, this process greatly reduces the multi-request processing performance
Module Modules mode
In the case of using Apache as a Web server, using the characteristics of Apache, DSO dynamically shared objects, PHP as an Apache module, when the need to interpret PHP files, the use of php_mod to explain the dynamic files, no need to start additional processes, The disadvantage is that the process content is complex
fastcgi mode
due to CGI performance flaws, the new process is created when the request arrives, and the execution environment is initialized every time, so the fastcgi mechanism first, the master process is established, the configuration file is parsed, the execution environment is initialized, and then a number of worker processes are pre-generated, and when the dynamic request arrives, master passes the request to one of the workers and receives the next request immediately. and dynamically adjust the number of worker processes, greatly improving the performance. php5.4 later version of the kernel has integrated php-fpm(Fast PHP module)
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/48/wKioL1WXZpjiP3zRAAD6qvZIQIc302.jpg "title=" 2015-06-22_10-53-55.png "alt=" Wkiol1wxzpjip3zraad6qvziqic302.jpg "/>
This article is from the "Call Me boxin" blog, so be sure to keep this source http://boxinknown.blog.51cto.com/10435935/1670847
Three modes combined with Web server and PHP