wfgydbu opened a new issue #2906:
URL: https://github.com/apache/apisix/issues/2906


   Hi, community.
   
   Considering this scenario: 
   In a single datasenters(DCs), there are several nodes(or machines, not the 
node in upstream definition), each node deploys multiple instances as head 
services. All head services are functionally equivalent.
   And apisix as the gateway to access all instances.
   
   ```
   |                     apisix                              |
   | -------- -------- -------- -------- -------- --------   |
   |      node1       |      node2       |   nodeN           |
   | -------- -------- -------- -------- -------- --------   |
   | node1:port1(n11) | node2:port1(n21) |   ....            |
   | node1:port2(n12) | node2:port2(n22) |   ....            |
   | node1:port3(n13) | node2:port3(n23) |   ....            |
   | node1:port4(n14) | node2:port4(n24) |   ....            |
   ```
   
   We found current route configuration may sometimes be unclear and hard to 
manage. Consider:
   (1) Dynamically pick some head service instances for special use, e.g. 
choose first two instances from **each node** to handle inner requests. (In 
this case, we have 2 logical upstream groups).
   (2) if one instance was down, to maintain the SLA of the whole system, we 
pessimistically consider all instances on the same node were down either and 
immediately kick-off the whole node. In this case, we can simply remove one 
"upstream group" in the route. 
   (3) if one single request had failed, it is safe to make it retry with the 
instance on other nodes, not another instance on the same node. (without 
upstream group, it is a bit difficult to find the right instance to retry.)
   
   What do you think?
   Thanks.
   
   


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

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


Reply via email to