Advantages of PHP fastcgi

Source: Internet
Author: User
Tags php source code
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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.