Hi
I have a simple setup for my upstream servers;
upstream web1 {
ip_hash;
server 10.0.1.101:80 weight=10 max_fails=3 fail_timeout=10;
server 10.0.1.102:80 weight=10 max_fails=3 fail_timeout=10;
}
I am using ip_hash due to session limitations within the Java app.
Never the less, if server 10.0.1.102 suffers an issue and does not reply back within the set time (3x 10seconds) then the request will be sent to 10.0.10.102 as expected. The user does suffer a 30 second delay however.
When the user makes another connection (after 10 seconds), nginx will once again try to send the request to 10.0.1.101.
However, if 10.0.1.101 is still un-responsive, the user will suffer another 30 second delay.
This will go on and on for 30 seconds delay, 10 second working, 30 second delay, etc etc until some on restarts the app on 10.0.1.101.
Would it be possible to add a new variable to the server line to mark the server down for X seconds - separate to fail_timeout. This way I can set the "inoperable" time to 5 minutes say ?
Or am I totally missing a configuration some where?
Thanks