You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/07/22 02:25:10 UTC

[GitHub] [apisix] kuberxy opened a new issue #4649: request help: Why is the request forwarded to an unhealthy node

kuberxy opened a new issue #4649:
URL: https://github.com/apache/apisix/issues/4649


   ### Issue description
   What is the difference between an active health check and a passive health check that you implement? Is there a detailed documentation?
   
   The following is my uptream configuration:
   ```
   $ cat apisix.yaml
   upstreams:
       -
           id: 1
           name: "nginx"
           nodes:
               "nginx1:8080": 1
               "nginx2:8080": 1
               "nginx3:8080": 1
           type: roundrobin
           checks:
               active:
                   http_path: "/web.healthy"
                   healthy:
                       interval: 2
                       successes: 1
       -
           id: 2
           name: "tomcat"
           nodes:
               "tomcat1:8081": 1
               "tomcat2:8081": 1
               "tomcat3:8081": 1
           type: roundrobin
           checks:
               active:
                   http_path: "/app.healthy"
                   healthy:
                       interval: 2
                       successes: 1
   
   routes:
       -
           uri: /*
           vars:
               -
                   - uri
                   - ~*
                   - .(jpg|gif|png|css|js|html|ico|ttf)$
           upstream_id: 1
       -
           uri: /*
           upstream_id: 2
   #END
   ```
   With this configuration, requests are forwarded to unhealthy nodes when the backend node network does not work.
   Do both active and passive checks have to exist?
   
   ### Environment
   * apisix version (cmd: `apisix version`): 2.3
   * OS (cmd: `uname -a`): 4.15.0-111-generic Ubuntu 18.04 
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): openresty/1.15.8.3
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): Stand-Alone
   * apisix-dashboard version, if have: not have
   * luarocks version, if the issue is about installation (cmd: `luarocks --version`): 2.4.2
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy edited a comment on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy edited a comment on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-892528919






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy edited a comment on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy edited a comment on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-885387622


   > > all upstream servers tried while connecting to upstream
   
   You can see this log. When all nodes are unhealthy, APISIX reverts back to the default load balance mode, does not care about the node health status. Because there are no healthy nodes available anymore.
   What is the scope of the default load balancing mode, is it a single request, or a period of time?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-885369324


   > all upstream servers tried while connecting to upstream
   
   You can see this log. When all nodes are unhealthy, APISIX reverts back to the default load balance mode, does not care about the node health status. Because there are no healthy nodes available anymore.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy commented on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-885359581


   @spacewander  @tzssangglass  thanks. 
   in my environment, after one node goes down, other nodes have a certain load, which affects the health check (thinking that all nodes are unavailable), causing requests to be forwarded to the down node.
   my error log like this:
   ```
   2021/07/23 09:31:13 [error] 12880#12880: *1177465 upstream timed out (110: Connection timed out), client: 127.0.0.1, server: , request: "GET /res/static/css/Ktv.css HTTP/1.1", upstream: "http://192.168.3.11:8091/res/static/css/Ktv.css", host: "test.example.com", referrer: "https://test.example.com/circle/"
   2021/07/23 09:31:13 [error] 12878#12878: *1177487 upstream timed out (110: Connection timed out), client: 127.0.0.1, server: , request: "GET /circle/circle/reader.js HTTP/1.1", upstream: "http://192.168.3.11:8091/circle/circle/reader.js", host: "test.example.com", referrer: "https://test.example.com/circle/"
   2021/07/23 09:31:13 [error] 12878#12878: *1177487 [lua] balancer.lua:199: load_balancer(): failed to pick server: failed to find valid upstream server, all upstream servers tried while connecting to upstream, client: 127.0.0.1, server: , request: "GET /circle/circle/reader.js HTTP/1.1", upstream: "http://192.168.3.11:8091/circle/circle/reader.js", host: "test.example.com", referrer: "https://test.example.com/circle/"
   2021/07/23 09:31:13 [error] 12880#12880: *1177465 [lua] balancer.lua:199: load_balancer(): failed to pick server: failed to find valid upstream server, all upstream servers tried while connecting to upstream, client: 127.0.0.1, server: , request: "GET /res/static/css/Ktv.css HTTP/1.1", upstream: "http://192.168.3.11:8091/res/static/css/Ktv.css", host: "test.example.com", referrer: "https://test.example.com/circle/"
   2021/07/23 09:31:52 [error] 12877#12877: *1209538 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /circle/circle/clear.gif HTTP/1.1", upstream: "http://192.168.3.12:8091/circle/circle/clear.gif", host: "test.example.com", referrer: "https://test.example.com/circle/"
   2021/07/23 09:32:12 [error] 12875#12875: *1216086 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /res/static/circle/images/find.png HTTP/1.1", upstream: "http://192.168.3.12:8091/res/static/circle/images/find.png", host: "test.example.com", referrer: "https://test.example.com/circle/"
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy commented on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-885387622


   > > all upstream servers tried while connecting to upstream
   > 
   > You can see this log. When all nodes are unhealthy, APISIX reverts back to the default load balance mode, does not care about the node health status. Because there are no healthy nodes available anymore.
   What is the scope of the default load balancing mode, is it a single request, or a period of time?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy commented on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-892528919


   @spacewander  I have a question: In my scenario, one node is out of network (Connection timed out), and the other two nodes are normal. Why did Apisix not forward the request to the normal node, but still forward it to the abnormal node. 
   When I force a refresh, the page has been loading.
   In the same scenario, I directly use Nginx as a proxy, and the page is loaded quickly. my nginx config like this:
   ```
   upstream nginx {
       server nginx1:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server nginx2:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server nginx3:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
   }
   
   upstream tomcat {
       server tomcat1:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server tomcat2:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server tomcat3:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
   
   }
   
   server {
       server_name 0.0.0.0;
       listen 80; 
   
       location ~* \.(jpg|gif|png|css|js|html|ico|ttf)$ {
           proxy_pass http://nginx;
           proxy_set_header Host $http_host;
       }
    
       location / {
           proxy_pass http://tomcat;
           proxy_set_header Host $http_host;
       }
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy edited a comment on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy edited a comment on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-885442801


   Is apisix sensitive to disk IO? When a certain CPU wait (not very high) occurs, the request is forwarded to unhealthy nodes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-884626291


   I try to reproduce with:
   ```
   upstreams:
       -
           id: 1
           name: "nginx"
           nodes:
               "127.0.0.1:8080": 1 # unreachable
               "127.0.0.1:1980": 1
           type: roundrobin
           checks:
               active:
                   http_path: "/get"
                   healthy:
                       interval: 2
                       successes: 1
   routes:
       -
           uri: /*
           upstream_id: 1
   #END
   
   ```
   
   Only the first few requests hit port 8080. After `8080` is marked as unhealthy, like:
   
   ```
   2021/07/22 11:02:22 [warn] 5473#5473: *645 [lua] healthcheck.lua:1107: log(): [healthcheck] (upstream#/upstreams/1) unhealthy TCP increment (2/2) for '(127.0.0.1:8080)', context: ngx.timer, client: 127.0.0.1, server: 0.0.0.0:9080
   ```
   
   every request hit port 1980 only. 
   
   Here is my result:
   ```
    incubator-apisix (63f779ae*) 0
    ¥ curl http://127.0.0.1:9080/get
   OK%                                                                                                                                                                                 incubator-apisix (63f779ae*) 0
    ¥ curl http://127.0.0.1:9080/get
   <html>
   <head><title>502 Bad Gateway</title></head>
   <body>
   <center><h1>502 Bad Gateway</h1></center>
   <hr><center>openresty</center>
   </body>
   </html>
    incubator-apisix (63f779ae*) 0
    ¥ curl http://127.0.0.1:9080/get
   OK%                                                                                                                                                                                 incubator-apisix (63f779ae*) 0
    ¥ curl http://127.0.0.1:9080/get
   OK%                                                                                                                                                                                 incubator-apisix (63f779ae*) 0
    ¥ curl http://127.0.0.1:9080/get
   OK%                                                                                                                                                                                 incubator-apisix (63f779ae*) 0
    ¥ curl http://127.0.0.1:9080/get
   OK%                                                                                                                                                                                 incubator-apisix (63f779ae*) 0
    ¥ wrk http://127.0.0.1:9080/get
   Running 10s test @ http://127.0.0.1:9080/get
     2 threads and 10 connections
     Thread Stats   Avg      Stdev     Max   +/- Stdev
       Latency    10.05ms    2.32ms  33.74ms   88.89%
       Req/Sec   501.77     46.83   600.00     72.00%
     9996 requests in 10.01s, 1.54MB read
   Requests/sec:    998.87
   Transfer/sec:    157.98KB
   ```
   
   You can check the error log and decrease the log level or add more logs to see what happened indeed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy edited a comment on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy edited a comment on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-885387622


   > You can see this log. When all nodes are unhealthy, APISIX reverts back to the default load balance mode, does not care about the node health status. Because there are no healthy nodes available anymore.
   
   What is the scope of the default load balancing mode, is it a single request, or a period of time?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy commented on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-885558540


   I know why my request is forwarded to unhealthy nodes.
   
   My nginx and tomcat are running in Pod and use hostPort to expose ports. 
   
   My Pod network is in Flannel VXLAN mode. 
   
   When the node is down and restarted, the policy of the FORWARD chain in ipables becomes DROP.
   
   In this case, the request sent to the down node is hung and no connection refused is returned. like this:
   ```
   $ time curl 192.168.3.11:8090
   
   curl: (7) Failed to connect to 192.168.3.11 port 8090: Connection timed out
   
   real	2m10.256s
   user	0m0.020s
   sys	0m0.004s
   ```
   At this time, there are still requests being forwarded to this node


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy commented on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-885442801


   Is apisix sensitive to disk IO? If a certain CPU wait (not very high) occurs, the request is forwarded to unhealthy nodes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tokers commented on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-885498052


   > Is apisix sensitive to disk IO? When a certain CPU wait (not very high) occurs, the request is forwarded to unhealthy nodes.
   
   Only write the error log messages to file will be related to the disk IO, but it by no means of affecting the decision of load balancer.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy edited a comment on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy edited a comment on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-892528919


   @spacewander  I have a question: In my scenario, one node is out of network (Connection timed out), and the other two nodes are normal. Why did Apisix not forward the request to the normal node, but still forward it to the abnormal node. 
   When I force a refresh, the page has been loading.
   In the same scenario, I directly use Nginx as a proxy, and the page is loaded quickly. my nginx config like this:
   ```
   upstream nginx {
       server nginx1:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server nginx2:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server nginx3:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
   }
   
   upstream tomcat {
       server tomcat1:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server tomcat2:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server tomcat3:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
   
   }
   
   server {
       server_name 0.0.0.0;
       listen 80; 
   
       location ~* \.(jpg|gif|png|css|js|html|ico|ttf)$ {
           proxy_pass http://nginx;
           proxy_set_header Host $http_host;
       }
    
       location / {
           proxy_pass http://tomcat;
           proxy_set_header Host $http_host;
       }
   }
   ```
   Is Apisix's passive health check not working?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy edited a comment on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy edited a comment on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-885359581


   @spacewander  @tzssangglass  thanks. 
   
   in my environment, after one node goes down, other nodes have a certain load, which affects the health check (thinking that all nodes are unavailable), causing requests to be forwarded to the down node.
   
   my error log like this:
   ```
   2021/07/23 09:31:13 [error] 12880#12880: *1177465 upstream timed out (110: Connection timed out), client: 127.0.0.1, server: , request: "GET /res/static/css/Ktv.css HTTP/1.1", upstream: "http://192.168.3.11:8091/res/static/css/Ktv.css", host: "test.example.com", referrer: "https://test.example.com/circle/"
   2021/07/23 09:31:13 [error] 12878#12878: *1177487 upstream timed out (110: Connection timed out), client: 127.0.0.1, server: , request: "GET /circle/circle/reader.js HTTP/1.1", upstream: "http://192.168.3.11:8091/circle/circle/reader.js", host: "test.example.com", referrer: "https://test.example.com/circle/"
   2021/07/23 09:31:13 [error] 12878#12878: *1177487 [lua] balancer.lua:199: load_balancer(): failed to pick server: failed to find valid upstream server, all upstream servers tried while connecting to upstream, client: 127.0.0.1, server: , request: "GET /circle/circle/reader.js HTTP/1.1", upstream: "http://192.168.3.11:8091/circle/circle/reader.js", host: "test.example.com", referrer: "https://test.example.com/circle/"
   2021/07/23 09:31:13 [error] 12880#12880: *1177465 [lua] balancer.lua:199: load_balancer(): failed to pick server: failed to find valid upstream server, all upstream servers tried while connecting to upstream, client: 127.0.0.1, server: , request: "GET /res/static/css/Ktv.css HTTP/1.1", upstream: "http://192.168.3.11:8091/res/static/css/Ktv.css", host: "test.example.com", referrer: "https://test.example.com/circle/"
   2021/07/23 09:31:52 [error] 12877#12877: *1209538 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /circle/circle/clear.gif HTTP/1.1", upstream: "http://192.168.3.12:8091/circle/circle/clear.gif", host: "test.example.com", referrer: "https://test.example.com/circle/"
   2021/07/23 09:32:12 [error] 12875#12875: *1216086 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /res/static/circle/images/find.png HTTP/1.1", upstream: "http://192.168.3.12:8091/res/static/circle/images/find.png", host: "test.example.com", referrer: "https://test.example.com/circle/"
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy commented on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-892538208


   In my abnormal scenario, using apisix as a proxy, it took more than 3 minutes to load the homepage, while using nginx as the homepage, it only took 500 milliseconds to load the homepage.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-885406477


   There is no so-called "default load balancing mode". We just ignore the health info.
   
   Here is the doc:
   > If there is no healthy node can be chosen, we will continue to access the upstream
   
   https://apisix.apache.org/docs/apisix/health-check
   
   Here is the code:
   https://github.com/apache/apisix/blob/aa7ecfafd7fc036b555014418dedb7fd4be1815e/apisix/balancer.lua#L84-L94


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy edited a comment on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy edited a comment on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-892528919


   @spacewander  I have a question: In my scenario, one node is out of network (Connection timed out), and the other two nodes are normal. Why did Apisix not forward the request to the normal node, but still forward it to the abnormal node. 
   When I force a refresh, the page has been loading.
   In the same scenario, I directly use Nginx as a proxy, and the page is loaded quickly. my nginx config like this:
   ```
   upstream nginx {
       server nginx1:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server nginx2:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server nginx3:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
   }
   
   upstream tomcat {
       server tomcat1:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server tomcat2:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server tomcat3:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
   
   }
   
   server {
       server_name 0.0.0.0;
       listen 80; 
   
       location ~* \.(jpg|gif|png|css|js|html|ico|ttf)$ {
           proxy_pass http://nginx;
           proxy_set_header Host $http_host;
       }
    
       location / {
           proxy_pass http://tomcat;
           proxy_set_header Host $http_host;
       }
   }
   ```
   Is Apisix's active and passive health check not working?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander closed issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #4649:
URL: https://github.com/apache/apisix/issues/4649


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-884996996


   > What is the difference between an active health check and a passive health check that you implement? Is there a detailed documentation?
   
   here: https://github.com/apache/apisix/blob/master/docs/en/latest/health-check.md
   
   > Do both active and passive checks have to exist?
   
   no need, but your configuration will turn on the default passive health check.
   
   you can set `log_level` to `debug` to get more logs about the health changes of the nodes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy commented on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-892528919






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy edited a comment on issue #4649: request help: Why is the request forwarded to an unhealthy node

Posted by GitBox <gi...@apache.org>.
kuberxy edited a comment on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-892528919


   @spacewander  I have a question: In my scenario, one node is out of network (Connection timed out), and the other two nodes are normal. Why did Apisix not forward the request to the normal node, but still forward it to the abnormal node. 
   When I force a refresh, the page has been loading.
   In the same scenario, I directly use Nginx as a proxy, and the page is loaded quickly. my nginx config like this:
   ```
   upstream nginx {
       server nginx1:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server nginx2:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server nginx3:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
   }
   
   upstream tomcat {
       server tomcat1:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server tomcat2:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
       server tomcat3:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
   
   }
   
   server {
       server_name 0.0.0.0;
       listen 80; 
   
       location ~* \.(jpg|gif|png|css|js|html|ico|ttf)$ {
           proxy_pass http://nginx;
           proxy_set_header Host $http_host;
       }
    
       location / {
           proxy_pass http://tomcat;
           proxy_set_header Host $http_host;
       }
   }
   ```
   Apisix's passive check check is not working?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org