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 2022/02/22 09:40:32 UTC

[GitHub] [apisix] purekeeper opened a new issue #6420: request help: I need two backend

purekeeper opened a new issue #6420:
URL: https://github.com/apache/apisix/issues/6420


   ### Issue description
   
   I want have two  upstream , if  one return error, it colud fallback  to the other upstream,
   
   For example :
   
   client request http://aa.bb.com/test   default backend is proxy_pass to   **http://10.100.22.11**,  if it return error  or healthcheck error , the request should fallback to **https://cc.dd.com**,   note that the first is http ,the second is https,
   so what should i do for it?
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   


-- 
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 #6420: request help: I need two backend

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


   Yeah, currently the `scheme` is on the upstream level.


-- 
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] purekeeper commented on issue #6420: request help: I need two backend

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


   @Chever-John @starsz    Thanks for reply, please note the default backend is http  protocal   , falback to https protocal,  as my understand the node priority have to keep  same protocal ,right ?   Thants means we can't write like
   
    "nodes": [
               {"host": "**http**://127.0.0.1", "port": 1980, "weight": 2000},
               {"host": "**https**://10.100.22.33", "port": 1981, "weight": 1, "priority": -1}
           ],
   
   right  ?


-- 
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] starsz commented on issue #6420: request help: I need two backend

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


   Hi @purekeeper.
   You can set `https://cc.dd.com/` with negative priority.
   
   > As the default priority is 0, we can configure nodes with negative priority as the backup.
   Refer to the doc: https://apisix.apache.org/docs/apisix/admin-api


-- 
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] Chever-John commented on issue #6420: request help: I need two backend

Posted by GitBox <gi...@apache.org>.
Chever-John commented on issue #6420:
URL: https://github.com/apache/apisix/issues/6420#issuecomment-1048361313


   If I understand you correctly, I think [this](https://apisix.apache.org/docs/apisix/admin-api/#:~:text=https%20is%20valid.-,Note%3A,-Each%20node%20can) is what you mean.
   Just to validate my idea.
   Thinks!


-- 
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] starsz commented on issue #6420: request help: I need two backend

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


   > @Chever-John @starsz Thanks for reply, please note the default backend is http protocal , falback to https protocal, as my understand the node priority have to keep same protocal ,right ? Thants means we can't write like
   > 
   > "nodes": [ {"host": "**http**://127.0.0.1", "port": 1980, "weight": 2000}, {"host": "**https**://10.100.22.33", "port": 1981, "weight": 1, "priority": -1} ],
   > 
   > right ?
   
   Yes.As @tokers said.


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