MonkeyDLufy commented on issue #10826:
URL: https://github.com/apache/apisix/issues/10826#issuecomment-1893173011

   curl http://127.0.0.1:9180/apisix/admin/stream_routes/1 -X PUT -d '
   {
       "server_port": 9100,
       "upstream": {
           "nodes": {
               "10.178.178.178:80": 1,
               "10.187.187.187:80": 1
           },
           "type": "roundrobin",
           "scheme": "tcp",
           "checks": {
               "active": {
                   "type": "tcp",
                   "unhealthy": {
                       "interval": 1,
                       "tcp_failures": 3
                   },
                   "healthy": {
                       "interval": 2,
                       "successes": 1
                   }
               }
           }
       }
   }'
   
   This is my config. I used tcpdump to capture packets and observed that the 
probe packets for active health checks were not sent. Among the two IP 
addresses in the example, one of them is not reachable. I expected it to be 
circuit broken and not receive any traffic, but apisix still sent traffic to it 
until the connection timed out and then retried with another available node.
   
   > Hi @MonkeyDLufy please check the docs here if this is what you are looking 
for 
https://apisix.apache.org/docs/apisix/next/tutorials/health-check/#active-check
   > 
   > Are you having any specific problems in configuring it?
   
   curl http://127.0.0.1:9180/apisix/admin/stream_routes/1 -X PUT -d '
   {
       "server_port": 9100,
       "upstream": {
           "nodes": {
               "10.178.178.178:80": 1,
               "10.187.187.187:80": 1
           },
           "type": "roundrobin",
           "scheme": "tcp",
           "checks": {
               "active": {
                   "type": "tcp",
                   "unhealthy": {
                       "interval": 1,
                       "tcp_failures": 3
                   },
                   "healthy": {
                       "interval": 2,
                       "successes": 1
                   }
               }
           }
       }
   }'
   
   This is my config. I used tcpdump to capture packets and observed that the 
probe packets for active health checks were not sent. Among the two IP 
addresses in the example, one of them is not reachable. I expected it to be 
circuit broken and not receive any traffic, but apisix still sent traffic to it 
until the connection timed out and then retried with another available 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to