-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Routing performance improvements #38117
Comments
Thanks for contacting us. We're moving this issue to the |
Thanks for contacting us. We're moving this issue to the |
I've created an issue/PR which may go a small way towards improving routing perf. |
We've seen some issues with large DFAs as a result of some patterns that involve a large amount of variable prefixes. We've done work in 6.0 to address this via automatically trimming the DFA we generate by leveraging existing route constraints as well as the existing structure in complex segments.
However, all these techniques don't guarantee smaller DFAs (although in most common cases they will) and require explicit actions from the user to identify and address this issue (adding constraints to the app). We believe there are other optimizations we can do in this space that will have an impact in the size of the DFA without involving explicit user action.
This is critical to provide a good experience for large applications as well as proxy servers like YARP as it contributes to reduce the memory footprint required to run those apps.
In addition to this, there are other things we want to consider with regards to performance on a per request basis. Our MapFallback APIs greatly negatively impact matching on other scenarios as they force a dynamic endpoint on to all the endpoint candidate lists of the app.
Another initiative to pursue in this area is the ability to have more powerful matching primitives on a segment. Proxying scenarios involve matching a segment but not capturing the value, which reduces allocations per request. We do custom processing for complex segments where we perform our own "pseudo-regex" matching. We are also interested on some potential new "regex segment" as a more powerful expression of complex segments.
You can currently use regex constraints in parameters, however that leads to an awkward syntax and doesn't allow for capturing subsets of the regex expressions. These come in to play in proxying scenarios and other servers offer similar functionality. This might allows us to do two things:
#33749
#27996
#27840
The text was updated successfully, but these errors were encountered: