-
Notifications
You must be signed in to change notification settings - Fork 864
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
Apply pattern transform to the host destination address #399
Comments
Something like this is possible already, but only within the path: Getting it into the destination host is trickier, that's not a field we currently support transforms for. That said, templated destinations seem at odds with some of the other parts of the stack. E.g. Counting the number of outstanding requests per destination for load balancing purposes, or sending health checks to the destinations. From a higher level design, different versions of your site should be hosted in different logical Clusters, each with their own destinations. Then you'd have a route for each version that mapped to each cluster. The partitioning feature might also allow this to be done with a single route.
While slightly more verbose, it's much less complex to implement (it should already work today). Edit: I forgot the transform to remove the version from the path.
|
@Tratcher Thank you for all thoughts! I've already aware about those 'static' options. And I'm using 1 cluster per version. It's working fine. Very good point about load balancing and health checks. Maybe a DynamicDestination class can be an exception for the rule. I'm not sure about it. But could be really useful. I didn't get how partition will work. Thanks! |
Triage: It seems support of templated destination would bring bunch of complexities, which don't seem to justify the value. |
With pattern matching support in the destination address the proxy will be very flexible and useful for API Versioning.
This way the reverse proxy will help a lot in cases where the api versions are published to different hosts like:
myapi-v1.azurewebsites.net
myapi-v2.azurewebsites.net
Examples:
path: "v{version}/{**catch-all}"
address: https://myapi-v{version}.azurewebsites.net"
https://proxy.azurewebsites.net/v1/test/1 -> https://myapi-v1.azurewebsites.net/test/1
https://proxy.azurewebsites.net/v2/test/2 -> https://myapi-v2.azurewebsites.net/test/2
The text was updated successfully, but these errors were encountered: