Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4915 - trunk/src/http

Anonymous User
November 16, 2012 07:20AM
Author: ru
Date: 2012-11-16 12:18:05 +0000 (Fri, 16 Nov 2012)
New Revision: 4915
URL: http://trac.nginx.org/nginx/changeset/4915/nginx

Log:
Upstream: honor the "down" flag for a single server.

If an upstream block was defined with the only server marked as
"down", e.g.

upstream u {
server 127.0.0.1:8080 down;
}

an attempt was made to contact the server despite the "down" flag.
It is believed that immediate 502 response is better in such a
case, and it's also consistent with what is currently done in case
of multiple servers all marked as "down".


Modified:
trunk/src/http/ngx_http_upstream_round_robin.c

Modified: trunk/src/http/ngx_http_upstream_round_robin.c
===================================================================
--- trunk/src/http/ngx_http_upstream_round_robin.c 2012-11-16 09:37:14 UTC (rev 4914)
+++ trunk/src/http/ngx_http_upstream_round_robin.c 2012-11-16 12:18:05 UTC (rev 4915)
@@ -430,6 +430,10 @@
if (rrp->peers->single) {
peer = &rrp->peers->peer[0];

+ if (peer->down) {
+ goto failed;
+ }
+
} else {

/* there are several peers */

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r4915 - trunk/src/http

Anonymous User 939 November 16, 2012 07:20AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 243
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