- Good day. 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 a patch of PHP-FPM, which actually did not give a performance boost before mod_php, because, contrary to the ideology of FastCGI, it restarts the script every time. The FastCGI ideology implies a one-time initialization of the application at startup (loading the necessary classes, connecting to the database, etc.), and executing queries one by one.
phpFastCGI - the correct implementation of FastCGI, which allows you to achieve unthinkable performance.
Development is very active, and new features appear very quickly.
Project Page -
phpfastcgi.googlecode.comAn example of a simple application is
code.google.com/p/phpfastcgi/source/browse/trunk/example.phpIn action, an example can be seen here -
ya-tv.ru/phpfastcgid (it can lie periodically, this is normal, testing is in
progress ). The sample page easily maintains 5,000 requests per second in just 20 workers.
The project is still in the testing phase and lives only in SVN.
I invite all who are interested to take part in it!
$ svn checkout
phpfastcgi.googlecode.com/svn/trunk phpfastcgi
The number of features is quite large, among other things, it supports chroot, a smooth update of the working script (manual and automatic), a smooth restart (manual and upon reaching the maximum number of requests, memory limit, idle time). Among other benefits: now you don’t have to think about parsing% uXXXX in request parameters, it happens automatically.
Soon the documentation will be expanded and the apache-like method of running the workers will be implemented.
I should note that Windows platforms are not supported in any way and PHP> = 5.3 compiled with '--enable-pcntl' '--enable-shmop' '--enable-sockets' is required for operation.
')
Do not judge strictly, development is underway, this is not yet a stable release.
Thanks for attention!
UPD:Implemented support for multipart forms, applets, optimized code, implemented a hash of workers.