Introduction: This is PHP fastcgi the advantages of the detailed page, introduced and php,fcgi, CGI, fork, PHP php fastcgi The advantages of knowledge, skills, experience, and some PHP source code and so on.
class= ' pingjiaf ' frameborder= ' 0 ' src= ' http://biancheng.dnbcw.info/pingjia.php?id=357913 ' scrolling= ' no ' > FCGI Advantages:
1 do not fork for each request, do not underestimate the fork, for a very large amount of traffic, you use CGI, will cause the system fork a lot of process. Too many processes will cause a switchover, the overhead is not small.
2 fcgi initialization operation is not required for each request. Sometimes your business logic needs to connect a server, query the data, if the query is very frequent, with fcgi words can establish a long connection. With CGI, each time a connection is established, either the server side actively shuts down the connection or the CGI closes the connection, resulting in a certain number of time_wait connections.
FCGI Disadvantages:
1 If your program implements a problem somewhere, such as a small memory leak, the memory will be very large over time, CGI will not have this problem. To avoid such problems, many people prefer to exit automatically after fcgi handles a certain number of requests.
2 fcgi resident memory, how much occupies a bit of memory space.
In short, to see the need to choose, if the traffic is large enough to a certain program, CGI is not supporting the time or business logic requirements of resident memory services, with fcgi, otherwise, can use CGI to use CGI bar.
Love EE focus on Java Michael Jackson Video station JSON online tool
Http://biancheng.dnbcw.info/php/357913.html pageno:1