[nginx] Upstream: removed the quick recovery mechanism.

Maxim Dounin mdounin at mdounin.ru
Thu Sep 22 19:59:52 UTC 2016


details:   http://hg.nginx.org/nginx/rev/a44ba757851d
branches:  
changeset: 6704:a44ba757851d
user:      Ruslan Ermilov <ru at nginx.com>
date:      Thu Sep 22 19:32:45 2016 +0300
description:
Upstream: removed the quick recovery mechanism.

Its usefulness it questionable, and it interacts badly with max_conns.

diffstat:

 src/http/modules/ngx_http_upstream_least_conn_module.c |  6 ------
 src/http/ngx_http_upstream_round_robin.c               |  6 ------
 src/stream/ngx_stream_upstream_least_conn_module.c     |  6 ------
 src/stream/ngx_stream_upstream_round_robin.c           |  6 ------
 4 files changed, 0 insertions(+), 24 deletions(-)

diffs (64 lines):

diff --git a/src/http/modules/ngx_http_upstream_least_conn_module.c b/src/http/modules/ngx_http_upstream_least_conn_module.c
--- a/src/http/modules/ngx_http_upstream_least_conn_module.c
+++ b/src/http/modules/ngx_http_upstream_least_conn_module.c
@@ -272,12 +272,6 @@ failed:
         ngx_http_upstream_rr_peers_wlock(peers);
     }
 
-    /* all peers failed, mark them as live for quick recovery */
-
-    for (peer = peers->peer; peer; peer = peer->next) {
-        peer->fails = 0;
-    }
-
     ngx_http_upstream_rr_peers_unlock(peers);
 
     pc->name = peers->name;
diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c
--- a/src/http/ngx_http_upstream_round_robin.c
+++ b/src/http/ngx_http_upstream_round_robin.c
@@ -485,12 +485,6 @@ failed:
         ngx_http_upstream_rr_peers_wlock(peers);
     }
 
-    /* all peers failed, mark them as live for quick recovery */
-
-    for (peer = peers->peer; peer; peer = peer->next) {
-        peer->fails = 0;
-    }
-
     ngx_http_upstream_rr_peers_unlock(peers);
 
     pc->name = peers->name;
diff --git a/src/stream/ngx_stream_upstream_least_conn_module.c b/src/stream/ngx_stream_upstream_least_conn_module.c
--- a/src/stream/ngx_stream_upstream_least_conn_module.c
+++ b/src/stream/ngx_stream_upstream_least_conn_module.c
@@ -268,12 +268,6 @@ failed:
         ngx_stream_upstream_rr_peers_wlock(peers);
     }
 
-    /* all peers failed, mark them as live for quick recovery */
-
-    for (peer = peers->peer; peer; peer = peer->next) {
-        peer->fails = 0;
-    }
-
     ngx_stream_upstream_rr_peers_unlock(peers);
 
     pc->name = peers->name;
diff --git a/src/stream/ngx_stream_upstream_round_robin.c b/src/stream/ngx_stream_upstream_round_robin.c
--- a/src/stream/ngx_stream_upstream_round_robin.c
+++ b/src/stream/ngx_stream_upstream_round_robin.c
@@ -491,12 +491,6 @@ failed:
         ngx_stream_upstream_rr_peers_wlock(peers);
     }
 
-    /* all peers failed, mark them as live for quick recovery */
-
-    for (peer = peers->peer; peer; peer = peer->next) {
-        peer->fails = 0;
-    }
-
     ngx_stream_upstream_rr_peers_unlock(peers);
 
     pc->name = peers->name;



More information about the nginx-devel mailing list