nginx_upstream_check_module
nginx_upstream_check_module copied to clipboard
default_down=false not work when nginx reload
upstream up1 { server 10.2.1.149:80 weight=10 max_fails=10 fail_timeout=6s; server 10.2.1.153:80 weight=10 max_fails=10 fail_timeout=6s; server 10.3.1.149:80 weight=10 max_fails=10 fail_timeout=6s; server 10.3.1.153:80 weight=10 max_fails=10 fail_timeout=6s backup; keepalive 128; check_keepalive_requests 1000; check default_down=false interval=3000 rise=2 fall=6 timeout=1000 type=http; check_http_send "GET /health HTTP/1.1\r\nHost: axxxx.com.cn\r\nConnection: keep-alive\r\n\r\n"; check_http_expect_alive http_2xx http_3xx; }
upstream up2 { server 10.2.1.149:80 weight=10 max_fails=10 fail_timeout=6s; server 10.2.1.153:80 weight=10 max_fails=10 fail_timeout=6s; server 10.3.1.149:80 weight=10 max_fails=10 fail_timeout=6s; server 10.3.1.153:80 weight=10 max_fails=10 fail_timeout=6s; keepalive 128; check_keepalive_requests 1000; check default_down=false interval=3000 rise=2 fall=6 timeout=1000 type=http; check_http_send "GET /health2 HTTP/1.1\r\nHost: axxxx.com.cn\r\nConnection: keep-alive\r\n\r\n"; check_http_expect_alive http_2xx http_3xx; }
nginx version: openresty/1.21.4.3 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) built with OpenSSL 1.1.1k 25 Mar 2021 TLS SNI support enabled configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt='-O2 -DTCP_FASTOPEN=23' --add-module=../ngx_devel_kit-0.3.2 --add-module=../echo-nginx-module-0.63 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.33 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.09 --add-module=../srcache-nginx-module-0.33 --add-module=../ngx_lua-0.10.25 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.34 --add-module=../array-var-nginx-module-0.06 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.9 --add-module=../rds-json-nginx-module-0.16 --add-module=../rds-csv-nginx-module-0.09 --add-module=../ngx_stream_lua-0.0.13 --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib --with-threads --with-pcre-jit --with-http_sub_module --with-http_v2_module --with-http_stub_status_module --with-http_realip_module --with-http_ssl_module --with-file-aio --with-http_auth_request_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_gzip_static_module --with-stream --with-stream_ssl_module --with-openssl=/tmp/openssl-1.1.1k --with-pcre=/tmp/pcre-8.45 --add-module=/tmp/nginx_upstream_check_module --with-openssl-opt=-g --with-pcre-opt=-g --with-stream --with-stream_ssl_preread_module
upstream up1中的server 10.3.1.149:80和10.3.1.153:80状态为down时,每次nginx reload操作up2中的10.3.1.149:80和10.3.1.153:80的default_donw=false不生效,总是会先变成down的状态,然后再变成up状态