nginx_upstream_check_module
                                
                                
                                
                                    nginx_upstream_check_module copied to clipboard
                            
                            
                            
                        Health check not working for our application
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?
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;
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+.patchAm 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?
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