Matcher-based route config should support `runtime_fraction`
- Dominant language
- C++
- Stars
- 28.9k
- Forks
- 5.6k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 430
Description
*Description*:
Currently XDS matcher in route configuration context can route based on headers only, but routing based on `runtime_fraction` is desired for gradual rollouts.
One way to implement is to expose `streamId` (or `randomId`) in `HttpMatchingData` alongside `requestHeaders`: https://github.com/envoyproxy/envoy/blob/4e40d6ad5f98cd3c86f1398bb8990b1d88bdfe92/envoy/http/filter.h#L1078-L1084
Then add `RuntimeFractionMatchInput` in addition to `HttpRequestHeaderMatchInput`, smth like:
```proto
message RuntimeMatchInput {
// Sets input to `true` if runtime key is enabled and `false` otherwise.
core.v3.RuntimeFractionalPercent runtime_fraction = 1;
}
```
And allow it as an input source for HTTP route configuration matcher (and maybe others as well, like RBAC, as I assume it also may want to have gradual rollout functionality).
Is it something which is acceptable to add to envoy?
*Relevant Links*:
https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/http_routing.html#routing-via-generic-matching
Contributor guide
Assessment
This issue has not been assessed yet.