Why Nginx Doesn't Implement FastCGI Multiplexing?

Wter S. lists at ruby-forum.com
Sun Sep 14 19:22:48 UTC 2014

Question about FastCGI: How it handle simultaneous connections with one 
process when PHP itself is blocking language ? What if I have something 
"sleep(100)" . Wont it block the process for the other users ?

Maxim Dounin wrote in post #1101079:
> Hello!
> On Sat, Mar 09, 2013 at 10:43:47PM +0800, Ji Zhang wrote:
>> But I also find an interesting article on how great this feature is,
>> back to 2002:
>> http://www.nongnu.org/fastcgi/#multiplexing
> This article seems to confuse FastCGI multiplexing with
> event-based programming.  Handling multiple requests in a single
> process is great - and nginx does so.  But you don't need FastCGI
> multiplexing to do it.
>> and perform asynchronously.
>> Does my point make sense? or some other more substantial reasons?
> You are correct, since FastCGI is used mostly for local
> communication, multiplexing on application level isn't expected to
> be beneficial.  Another reason is that multiplexing isn't
> supported (and probably will never be) by the major FastCGI
> application - PHP.
> There were several discussions on FastCGI multiplexing here, and
> general consensus seems to be that FastCGI multiplexing might
> be useful to reduce costs of multiple long-polling connections to
> an application, as it will reduce number of sockets OS will have
> to maintain.  It's yet to be demonstrated though.
> --
> Maxim Dounin
> http://nginx.org/en/donation.html

Posted via http://www.ruby-forum.com/.

More information about the nginx mailing list