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 2020/12/01 03:31:05 UTC

[GitHub] [apisix] wfgydbu opened a new issue #2906: [DISCUSS]: is it reasonable to support "upstream group"?

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:
users@infra.apache.org



[GitHub] [apisix] wfgydbu commented on issue #2906: [DISCUSS]: is it reasonable to support "upstream group"?

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


   Update: I find a new plugin named traffic-splt has been added recently. It perfectly satisfied our expection of "upstream-group". Based on that, I made a bit modificaitions to make it support upstream selection(loading balance or maybe disaster tolerance) and healthcheck mechanism. 
   
   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:
users@infra.apache.org



[GitHub] [apisix] spacewander closed issue #2906: [DISCUSS]: is it reasonable to support "upstream group"?

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


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] tokers commented on issue #2906: [DISCUSS]: is it reasonable to support "upstream group"?

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


   @wfgydbu What you described is more like a load balancing algorithm, which defines the topology for each node (in your context, not the node in APISIX upstream) and the abstraction model seems still fuzzy, welcome to post an email to the community and let's discuss it.
   
   Have you ever tries to solve this problem by splitting these nodes into different upstreams?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] wfgydbu commented on issue #2906: [DISCUSS]: is it reasonable to support "upstream group"?

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


   @tokers Thansk for your reply. The first problem is a bad example here, I will remove it when I send the email.
   
   And Yes, it is essentially a load balancing algorithm, except that the granularity for management is not node now but upstream, And one route can be configured with multiple upstreams(aka. upstream group). Then load balancing can be applied to upstream**s**. Other mechanism like healthcheck, retries may also be involved.
   
   I will post an email ASAP.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on issue #2906: [DISCUSS]: is it reasonable to support "upstream group"?

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


   @Firstsawyou PING


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] tokers edited a comment on issue #2906: [DISCUSS]: is it reasonable to support "upstream group"?

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


   @wfgydbu What you described is more like a load balancing algorithm, which defines the topology for each node (in your context, not the node in APISIX upstream) and the abstraction model seems still fuzzy, welcome to post an email to the community and let's discuss it.
   
   BTW, for the first problem: have you ever tried to split these nodes into different upstreams?


----------------------------------------------------------------
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:
users@infra.apache.org