- Notifications
You must be signed in to change notification settings - Fork10.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
I am writing a CMS. To keep my route handlers clean and focused, I want to separate my (somewhat complex) route matching from route handling. The combination of lack of route configuration after startup, and route constraints being NOT asynchronous, makes it difficult to achieve this goal of separation.
YARP provides a very good system for reloading routes after startup (and provides all the thread safety, etc...). For example, I have made very good use of in-memory configuration, loaded from a database, via a background service that refreshes every 5 minutes. This is GREAT for the actual function of a reverse proxy -- I am routing tenants to different servers, etc...
I have no doubt that I could probably configure YARP to do the routing that I want, BUT YARP is overkill for my application once i've gotten down to the site level and deciding whether to handle a hard-coded page, a page from our legacy database, or a page from a new shiny database (which are utterly different code paths).
Describe the solution you'd like
generalize YARP's concept of post-startup, snapshot based configuration swapping in AspNetCore.
Additional context
No response