Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an application built using Tornado, running on two 16 core servers with a frontend server with Nginx on. The deployment guidelines for Tornado suggest one instance of the app per CPU cure so I have, in total, 32 instances of the application running.
The problem I'm having with Nginx is that if something goes wrong with the app servers that causes all the instances to be unavailable (Causing a connect timeout), NGINX goes through each one of the 32 instances and checks it before returning an error. The connect timeout is set to 5 seconds so it would be over 2:30 mins before NGINX actually sent something back to the user saying it had failed.
Is there any way to limit the number of servers NGINX will retry before sending an error to the user? I.E. it checks two servers then just gives up rather than cycling through all of them?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You could add another layer of proxies by setting up nginx at each backend server so frontend will have only two servers listed in its upstream section instead of 32.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.