Welcome! Log In Create A New Profile

Advanced

proxy_next_upstream fail_timeout

Posted by cbennett 
proxy_next_upstream fail_timeout
February 04, 2014 02:10PM
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
Re: proxy_next_upstream fail_timeout
February 05, 2014 10:54PM
correction to above:

..."Never the less, if server 10.0.1.101 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."...
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 222
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready