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?
Asked
Active
Viewed 296 times
1
1 Answers
0
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.

AlexD
- 8,747
- 2
- 29
- 38