zuiyangqingzhou commented on issue #6443:
URL: https://github.com/apache/apisix/issues/6443#issuecomment-1053528484


   > > > See 
https://apisix.apache.org/docs/apisix/next/architecture-design/upstream/, you 
can refer to the node priority.
   > > 
   > > 
   > > This should not meet my requirement, my requirement is that under normal 
circumstances the request will only hit node A and node B. Only if both node A 
and node B are down, the request will auto go to node C.
   > 
   > Please read the upstream documentation carefully, this function can be 
achieved by node priority and active healthy check, there is a very clear 
demonstration case in the documentation, similar to the following:
   > 
   > ```shell
   > curl --location --request PUT 
'http://apisix-admin:9180/apisix/admin/routes/failover' \
   > --header 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \
   > --header 'Content-Type: application/json' \
   > --data-raw '{
   >     "host": "failover",
   >     "uri": "/*",
   >     "upstream": {
   >         "type": "roundrobin",
   >         "nodes": [
   >             {"host": "172.30.45.124", "port": 80, "weight": 1},
   >             {"host": "172.30.45.125", "port": 80, "weight": 1},
   >             {"host": "172.30.45.126", "port": 80, "weight": 1, "priority": 
-1}
   >         ],
   >         "checks": {
   >             "active": {
   >                 "http_path": "/status/200",
   >                 "healthy": {
   >                     "interval": 1,
   >                     "successes": 1
   >                 },
   >                 "unhealthy": {
   >                     "interval": 1,
   >                     "http_failures": 1
   >                 }
   >             }
   >         }
   >     },
   >     "name": "failover"
   > }'
   > ```
   
   Thanks for your patience


-- 
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