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

shadow traffic routing issues #1461

Open
szuecs opened this issue Jul 1, 2020 · 0 comments
Open

shadow traffic routing issues #1461

szuecs opened this issue Jul 1, 2020 · 0 comments
Labels

Comments

@szuecs
Copy link
Member

szuecs commented Jul 1, 2020

Assume we have 2 routes without shadow traffic. v1 is used to enter your site and in case you have a "valid" cookie you trust the client to enter the trusted part of our application.

v1: * -> "https://first.example.org"
v1cookie: Cookie("pseudo-auth") -> "https://first-trusted.example.org"

Let's assume you built a replacement of v1, and want to test with some percentage of traffic, you would add a third route with Traffic() predicate:

v1: * -> "https://first.example.org"
v2: Traffic(.01) -> "https://second.example.org"
v1cookie: Cookie("pseudo-auth") -> "https://first-trusted.example.org"

It looks like you have a successful shadow traffic route, but now you have a routing problem, because v2 and v1cookie have the same amount of predicates and theses are equally weighted.

The current fix is to use True() as a hack:

v1: * -> "https://first.example.org"
v2: Traffic(.01) -> "https://second.example.org"
v1cookie: Cookie("pseudo-auth") && True() -> "https://first-trusted.example.org"

I would propose, that we set Traffic() predicate to have weight 1 and all other predicates to have weight 2 as default.
This would solve the problem of having to add True().

Do you have other use cases for Traffic where it does not make sense to change this weight?

@szuecs szuecs added the question label Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant