apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

In route, both upstream and service<service can has upstream too> can be set at the same time

Open forgaoqiang opened this issue 5 years ago • 9 comments

Issue description

In route config, both upstream and service can be set at the same time we have two paths:

route -> upstream
route -> service -> upstream

At the same time, you can set an upstream to route and service at the same time, if I set an upstream to a route and associated a service to the route, which upstream will the route use?

Expected behavior

I think it should set upstream in service since we have a unique way to route a request Request -> match route -> go through the plugins in the service -> upstream to DST service provider

How to Reproduce

Screenshots

Environment

APISIX 2.6 with APISIX-dashboard 2.7

forgaoqiang avatar Jul 06 '21 08:07 forgaoqiang

🤔 When we select a Service, it should hide the Upstream page, cc @guoqqqi to take a look when you have time.

juzhiyuan avatar Jul 07 '21 02:07 juzhiyuan

Ok,Let me have a look

guoqqqi avatar Jul 08 '21 10:07 guoqqqi

@guoqqqi any update here?

juzhiyuan avatar Jul 10 '21 08:07 juzhiyuan

@guoqqqi any update here?

Yes, I found the problem in the latest version of the dashboard: When we select a service in the route page, clicking on the next page still configures the upstream.

guoqqqi avatar Jul 10 '21 09:07 guoqqqi

Our current version is

  • In the Route page, when selecting a service, you can select None to skip the Upstream page Do we need to update it

guoqqqi avatar Jul 10 '21 10:07 guoqqqi

Yes I think so, when binding a Servcie with Route, it should be ok to skip Upstream Configure.

juzhiyuan avatar Jul 10 '21 13:07 juzhiyuan

Yes I think so, when binding a Servcie with Route, it should be ok to skip Upstream Configure.

Agree, refer to https://github.com/apache/apisix/blob/master/docs/en/latest/architecture-design/service.md

actually when we associated a Route with a Service, we can also specify different plugin parameters or upstream for Route, at that time the Route parameter has a higher priority than Service. So it is ok for current dashboard IMO, when you want to use service upstream, just select None to skip the upstream page.

If we want to further optimize the user experience, we can make None as the default selection when select a service in the first step.

image

Looking forward to your reply @forgaoqiang

cc @guoqqqi @juzhiyuan

liuxiran avatar Jul 25 '21 17:07 liuxiran

Hi @forgaoqiang , did our answer solve your problem? If not, please update more details here, or we consider this issue to be resolved after three days, thanks a lot~

liuxiran avatar Aug 17 '21 19:08 liuxiran

close now, feel free to reopen it with any questions, thanks

liuxiran avatar Sep 08 '21 08:09 liuxiran