FastCGI and PHP

Reinis Rozitis r at
Wed Apr 2 13:45:28 MSD 2008

>> So is it possible to have multiple instances of a fastcgi server, each 
>> listening on a different port/socket, and have nginx balance the load 
>> between them?

Yes it should be possible (I haven't done it myself on nginx because for my 
setup using a single fastcgi server is enough as it saturates the CPU 
anyway) - by providing all the servers (ip/ports) in upstream (  ) an then giving that 
to fastcgi_pass

>> If so, would nginx understand the FCGI_OVERLOADED response and pass the 
>> request to another instance?

Not sure about this - probably the devs can give you an answer.

But fact is php doesnt return anything like that (at least it didnt some 
time ago I've last checked) and you have to relay on timeouts or returned 
errors (usually 500 - Internal Server Error or 502 Bad gateway).


More information about the nginx mailing list