microsoft / reverse-proxy

A toolkit for developing high-performance HTTP reverse proxy applications.
https://microsoft.github.io/reverse-proxy
MIT License
8.5k stars 838 forks source link

How do I achieve conditional rerouting for same incoming route to different destinations? #1993

Closed askids closed 1 year ago

askids commented 1 year ago

hi,

We are currently planning to use YARP as a proxy to allow us to migrate existing WebAPIs from Siteminder to Ping Access. All individual apis will use OAuth2 going forward. But we will have a proxy that will support Siteminder authentication cookie and internally generate access token before forwarding the request to individual APIs. The individual APIs could be hosted on VMs or on Openshift container.

I was wondering, if we wanted to extend the YARP usage later on, when everything will be OAuth2 based, lets say to do pilot routing for new features only for specific users, is it possible to do it with current version of YARP?

So essentially incoming route will be same. But based on the user for which request is coming in, I want to reroute request to either destination 1 or destination 2. This destination 1 or 2 can be an entirely different route or reroute to a new version of existing API. So the cluster itself could also be entirely different. Please suggest how this can be achieved.

Thanks!

Tratcher commented 1 year ago

Take a look at https://microsoft.github.io/reverse-proxy/articles/ab-testing.html https://github.com/microsoft/reverse-proxy/issues/126

adityamandaleeka commented 1 year ago

Looks like this has been answered. Closing the issue. If there is more discussion about the A/B testing scenario we can continue that on #126.