-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add efficient path-based prefix matching #18148
Comments
As @howardjohn said above, we've chosen to go with the "replace with regex" option for now in Contour, but strong +1 that this would be very nice for us. |
cc @htuch @envoyproxy/api-shepherds for thoughts |
We already do support control over route case sensitivity in matching. What is the actual feature request here? I'm a little confused. Why doesn't |
The problem is This is semantically equivalent to existing Envoy matching capabilities: |
OK, so you want a "path splitting prefix mode?" That seems simple enough. |
There's some overlap with #7763, which also provides matching with path fragments. |
I can try to do this, if it isn't obsoleted by the issue above. |
It would be nice to use unified matchers here. I imagine we'd need some sublinear implementation to deal with categories of templates (like in API gateway cases). |
@kyessenov, you mean having a new match pattern here? |
I was thinking something like https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/common/matcher/v3/matcher.proto#config-common-matcher-v3-matcher-matchertree but with a custom matcher for templated URLs. There is already a prefix matcher but I think it's the simple prefix. |
Sounds like straight up implementing #7763 |
The new field would allow more efficient generation of routes, replacing pairs of path+prefix routes into one path_separated_prefix route Risk Level: Low Testing: Unit test Docs Changes: inline Release Notes: Added Fixes #18148 Signed-off-by: Toma Petkov <tpetkov@vmware.com>
The new field would allow more efficient generation of routes, replacing pairs of path+prefix routes into one path_separated_prefix route Risk Level: Low Testing: Unit test Docs Changes: inline Release Notes: Added Fixes envoyproxy#18148 Signed-off-by: Toma Petkov <tpetkov@vmware.com>
Title: Add efficient path-based prefix matching
Description:
The Kubernetes Ingress spec, and soon the gateway-api spec (kubernetes-sigs/gateway-api#866) implement a different form of prefix path matching than Envoy. From the spec:
Essentially, if we want to match
prefix=/foo
in this manner we have two options:prefix=/foo/
and one withexact=/foo
.The first option has a runtime cost in route matching. The second has a cost in Envoy+Control plane during XDS processing.
Given how common this is/will be in Envoy users, it would be great if there was a more efficient way to control this. For example, setting a bool var like
case_sensitive
to control the behavior or defining some new type ofpath_specifier
.cc @jpeach @youngnick @lambdai
The text was updated successfully, but these errors were encountered: