Why Nginx Doesn't Implement FastCGI Multiplexing?

DevNginx nginx-forum at nginx.us
Fri Oct 4 13:43:41 UTC 2013


I would also like to add a vote for FCGI multiplexing.

There is no obligation for backends, since non-implementing backends can
indicate FCGI_CANT_MPX_CONN in response to a FCGI_GET_VALUES request by
nginx.  The other poster has already mentioned FCGI_ABORT_REQUEST and
dropping response packets from dangling requests.

My scenario is that I have a variety of requests:  some take a while, but
others are a quick URL rewrite culminating in a X-Accel-Redirect. This
rewrite involves complicated logic which is part of my overall backend
application., which I would rather not factor out and rewrite into a nginx
module  The actual computation for the URL rewrite is miniscule compared to
the overhead of opening/closing a TCP connection, so FCGI request
multiplexing would be of great help here.

If the overhead of a multiplexed FCGI request starts to approach doing the
work directly in an nginx module, it would give a valuable alternative to
writing modules.  This would avoid the pitfalls of writing modules (code
refactoring, rewriting in C, jeopardizing nginx worker process, etc.).

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,237158,243430#msg-243430



More information about the nginx mailing list