envoyproxy/envoy

Increase limit of path_match_policy.path_template variables

Open

#31.018 geöffnet am 22. Nov. 2023

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (1 zugewiesene Person)C++ (5.373 Forks)batch import
area/matchingenhancementhelp wanted

Repository-Metriken

Stars
 (27.997 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T) (378 gemergte PRs in 30 T)

Beschreibung

Right now the number of variables per path in path_match_policy.path_template is limited to 5: https://github.com/envoyproxy/envoy/blob/2de016d1007aabff202220b8177167c9ab3e8c6a/source/extensions/path/uri_template_lib/uri_template_internal.cc#L224-L226 https://github.com/envoyproxy/envoy/blob/2de016d1007aabff202220b8177167c9ab3e8c6a/source/extensions/path/uri_template_lib/uri_template_internal.cc#L37

I don't see a particular reason other than routing performance for this artificial limit. It is also not documented anywhere, just like the variable name limit of 16 characters.

What I do see is this somewhat low limit easily becoming a breaking factor in more complex setups such as the one I am working on right now.

Can this limit be increased and documented please? Without having any data other than my own use case, my guess is 10 would be a more realistic upper bound that would cover most if not all "realistic" use cases of others as well.

Alternatively, is there another feature that I could use to rewrite paths with variables that is better suited for a high number of variables that I am not aware of?

Contributor Guide