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

FractionalPercent when using with RouteMatch #11874

Closed
belyalov opened this issue Jul 2, 2020 · 5 comments · Fixed by #12068
Closed

FractionalPercent when using with RouteMatch #11874

belyalov opened this issue Jul 2, 2020 · 5 comments · Fixed by #12068
Labels
area/http question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently

Comments

@belyalov
Copy link
Contributor

belyalov commented Jul 2, 2020

Title: Log debug/info/whatever message when FractionalPercent.numerator greater than FractionalPercent.denominator
Description: When using FractionalPercent with RouteMatch it is possible to mess up with values on denominator / numerator so the underlying condition

(random_value % denominator) < numerator

Will be always evaluated to true because of numerator exceeds denominator. It becomes hard to debug why configuration does not work (no logs, just shows that clusterN has been selected).

Do you guys think it is make sense to add some kind of logging to simplify configuration debuggability?
If so I can add this.

Thanks

@snowp
Copy link
Contributor

snowp commented Jul 2, 2020

Alternatively we could add in configuration validation that will reject configuration where numerator > denominator, unless there are use cases where you'd want to do that?

@snowp snowp added area/http question Questions that are neither investigations, bugs, nor enhancements labels Jul 2, 2020
@belyalov
Copy link
Contributor Author

belyalov commented Jul 3, 2020

This is not clear to me:

  • route configuration simply depends on runtime key, basically string, seems nothing to validate here
  • update runtime values through rtds or any other methods could not be validated as well (simply ignore unacceptable values?)

@snowp
Copy link
Contributor

snowp commented Jul 6, 2020

I see, this is about using RuntimeFractionalPercent, not a FractionalPercent proto configured via xDS.

Seems like logging the numerator/denominator as debug/trace would be the best way to handle this since there is no validation framework around runtime values.

@belyalov
Copy link
Contributor Author

belyalov commented Jul 6, 2020

Ok, I'll take care of... :)

@stale
Copy link

stale bot commented Aug 8, 2020

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/http question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
2 participants