Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[discuss]: does the traffic-split plugin has a way to implement the original capabilities without corrupting the data? #3787

Closed
tzssangglass opened this issue Mar 9, 2021 · 4 comments

Comments

@tzssangglass
Copy link
Member

tzssangglass commented Mar 9, 2021

Issue description

prerequisite: the traffic-split plugin now controls the request proxy to a specific upstream by corrupting the upstream configuration in the route.

topic: is there a way to do the same thing without corrupting the upstream configuration in the route?

if there are problems with the prerequisite, please correct me

reference #3758

@moonming
Copy link
Member

@Firstsawyou

@membphis
Copy link
Member

ping @Firstsawyou

@Firstsawyou
Copy link
Contributor

@tzssangglass uses the method of "when the route is configured with an upstream_id, the upstream_id is passed into the server_list" to solve it.
Thank you very much @tzssangglass .

@Firstsawyou
Copy link
Contributor

Firstsawyou commented Mar 16, 2021

I think we can create a temporary variable to cache the upstream_id configured in the plug-in, and delete it after the end of use, so as to avoid the modification of ctx.matched_route.value.upstream_id. For example, create a temporary variable upstream_id_tmp: ctx.matched_route.value.upstream_id_tmp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants