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]: Distribute traffic in percentage between similar routes #2470

Closed
gxthrj opened this issue Oct 19, 2020 · 5 comments
Closed

[discuss]: Distribute traffic in percentage between similar routes #2470

gxthrj opened this issue Oct 19, 2020 · 5 comments

Comments

@gxthrj
Copy link
Contributor

gxthrj commented Oct 19, 2020

There is such a demand, how do you think it can be solved?

Description of Requirement: Distribute traffic in percentage between similar routes

such as:

route1 GET http://foo.com/hello bind plugins 1,2,3

route2 GET http://foo.com/hello bind plugins 1,3,4

Hope that 30% of the traffic of /hello matches route2, and the remaining traffic matches route1

@juzhiyuan
Copy link
Member

A/B Test?

@juzhiyuan
Copy link
Member

more like Gray release

@gxthrj
Copy link
Contributor Author

gxthrj commented Oct 22, 2020

Yes, just like the grey policy, which is different from our existing plug-in locations, it is done when the routing matches. Do you have such requirements

@membphis
Copy link
Member

https://github.com/apache/apisix/blob/master/doc/admin-api.md#route

we can use vars to implement this feature. just need a random number, eg: ["random_100", ">=", 30], it means 70%.

@spacewander
Copy link
Member

Consider solved

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