On 06/25/2015 01:31 PM, S.A.N wrote:
> New versions Nginx, implement thread pools,
> http://nginx.com/blog/thread-pools-boost-performance-9x/
> 
> I think this is a good opportunity to write a Nginx module (PHP SAPI)
> which is to process requests for PHP scripts in processes Nginx.
> 
> Quality advantages, as compared with the FPM, no network overhead,
> less memory consumption, may be implemented mode ZTS (Zend Thread
> Safety).

Putting an entire PHP request in one of these nginx threads seems like a
bad idea to me. Tons of things in PHP or in libraries called by PHP are
blocking, plus ZTS mode is slower, uses more memory than non-ZTS mode
and is in general just more complex to work with, especially when it
comes to process-wide things like env, locale and signals. Having a
clear separation between PHP and the web server makes many things much
simpler and more robust. You can also already do nginx to php-fpm
without any network overhead by using a unix domain socket.

-Rasmus

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to