nginx_upstream_check_module icon indicating copy to clipboard operation
nginx_upstream_check_module copied to clipboard

Health check not working for our application

Open detushar opened this issue 5 years ago • 3 comments

We have to install NGINX 1.16 recently with this module using the below command. In PRD, if any backend down. Nginx upstream still sending traffic to that dead instance.

patch -p1 <../nginx_upstream_check_module-master/check_1.14.0+.patch

Am i doing anything wrong here? What does this patch mean?

detushar avatar Feb 05 '20 02:02 detushar

Do you enable bellow directive in 'upstream': check interval=3000 rise=2 fall=5 timeout=1000 type=http; check_http_send "HEAD / HTTP/1.0\r\n\r\n"; check_http_expect_alive http_2xx http_3xx;

solio avatar Feb 18 '20 11:02 solio

We have to install NGINX 1.16 recently with this module using the below command. In PRD, if any backend down. Nginx upstream still sending traffic to that dead instance.

patch -p1 <../nginx_upstream_check_module-master/check_1.14.0+.patch

Am i doing anything wrong here? What does this patch mean?

See https://github.com/yaoweibin/nginx_upstream_check_module/issues/217, thinking that your nginx is 1.16, maybe you have used a wrong version of patch file?

mojodevops avatar May 04 '20 07:05 mojodevops

I have similar issue with random two

    random two;
    keepalive 300;
    server 192.168.0.1:80  max_fails=3 fail_timeout=15s weight=3;
    server 192.168.0.2:80  max_fails=3 fail_timeout=15s weight=3;
    server 192.168.0.3:80  max_fails=3 fail_timeout=15s weight=3;
    check_http_send "GET /available HTTP/1.0\r\nHost: test_internalhealthcheck\r\n\r\n";
    check_http_expect_alive http_2xx http_3xx;

if i set one upstream to respond with 503, nginx still sends requests to it. with least_conn it works better, still some of request are being send to the upstream which responds with http_5xx

Build info:

nginx version: nginx/1.16.1 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) built with OpenSSL 1.0.2k-fips 26 Jan 2017 patch -p1 < ../nginx_upstream_check_module/check_1.16.1+.patch

DonatasFe avatar Jun 25 '20 13:06 DonatasFe