Provide APIs for load balance to be used outside of reverse proxy
- Dominant language
- C#
- Stars
- 9.6k
- Forks
- 933
- Avg merge
- 12d 18h
- Merged PRs (30d)
- 2
Description
### What should we add or change to make your life better?
Provide a service in order to have the same load balancing policy for a cluster outside reverse proxy middleware.
```csharp
public interface ILoadBalanceService
{
DestinationConfig? PickDestination(string cluster);
}
```
### Why is this important to you?
We are using YARP with one cluster and multiple destinations. Most requests are being proxied to the cluster but we also have some routes that need some logic and don't exactly need to be proxied but to make a http call to the cluster. We don't need to send `HttpContext.Request` to the cluster and also don't want the response to be sent in `HttpContext.Response`. We only need the destination address of the cluster.
Contributor guide
Assessment
This issue has not been assessed yet.