- If the
portof my upstream's backend is closed, usually nginx fail very quickly and try the other backend, in the error log I can see
connect() failed (111: Connection refused) while connecting to upstream
- If my upstream's backend is down and there is no route to the host, nginx fail very slowly (~3 seconds) and causing delay in term of user experience, and in the error log I can see
connect() failed (113: No route to host) while connecting to upstream
So, it is possible to reduce the 3 seconds delay when nginx found out that the backend is not available?
proxy_connect_timeoutis irrelevant as it is default to60s, but from my test, during the host not found situation, the timeout is around3s– Ryan Jun 01 '13 at 02:20