Open TimHess opened 3 years ago
Related to #761
The plan is to replace DiscoveryClient.OnApplicationsChange
which exposes all mutable internals and has no test coverage, with an event that provides access to IList<IServiceInstance>
.
@macsux Thoughts?
YARP supports destinations resolver as a first-class pluggable API interface: https://microsoft.github.io/reverse-proxy/articles/destination-resolvers.html. Should be easy enough to map YARP to this
I'm not sure what you mean by configuration support. YARP bootstraps itself from some IConfiguration
section, and update it's own routing state dynamically when values change in underlying IConfiguration object. So you can do it today. Since the only way to dynamically refresh config server today is via polling refresh timer, it would be good to update the logic at some point to only raise change token if any of the config values actually changed, as proxy reconfiguration is a kinda heavy operation which you don't wanna call unless something truly got updated.
Beyond being possible it should be easy to use at least Config Server and Service Discovery with YARP
An example of getting service discovery to work: https://github.com/Layla-P/TackyTacos/commit/210c8727d30f150480811bc64e075faa0dff6369