phpFastCGI: true FastCGI for PHP

    - Good afternoon. You probably already heard about the FastCGI protocol, it connects the Web server and the application server, its implementation is in many languages. However, in PHP, the implementation of FastCGI until recently was represented only by the PHP-FPM patch, which actually did not give a performance gain before mod_php, because, contrary to the FastCGI ideology, it restarts the script every time again. The FastCGI ideology implies a one-time initialization of the application at startup (loading the necessary classes, connecting to the database, etc.), and executing the requests one by one.
    phpFastCGI is the correct implementation of FastCGI, which allows you to achieve incredible performance.
    Development is very active, and new features appear very quickly.
    Project Page -
    An example of a simple application is
    In action, an example can be seen here - (it may periodically lie, this is normal, testing is ongoing ). The example page easily withstands 5,000 requests per second in just 20 workers.
    The project is still in the testing phase and lives only in SVN.
    I invite everyone interested to take part in it!
    $ svn checkout phpfastcgi

    The number of features is quite large, including chroot, smooth updating of the working script (manual and automatic), smooth restart (manual and upon reaching the maximum number of requests, memory limit, idle time), among others. Among other benefits: now you do not have to think about parsing% uXXXX in the request parameters, this happens automatically.
    Soon the documentation will be expanded and an apache-like method for launching workers will be implemented.

    I should note that Windows platforms are not supported in any way and PHP> = 5.3 is required to work.

    Do not judge strictly, development is underway, this is not a stable release yet.
    Thanks for attention!

    Implemented support for multipart-forms, applause, optimized code, implemented a hash of state of workers.

    Also popular now: