[英]Redirecting traffic going to a single endpoint to a function in Azure Cloud Services (classic)
I've got a web api at api.mydomain.com running on Azure cloud services (classic). 我在api.mydomain.com上有一个运行在Azure云服务上的Web api(经典)。
I want a certain endpoint, say api.mydomain.com/end/point, to instead trigger an Azure function, and all the other traffic continue going to the app on api.mydomain.com. 我希望某个终结点(例如api.mydomain.com/end/point)来触发Azure函数,而所有其他流量都继续流向api.mydomain.com上的应用程序。
How do I do that with minimal overhead? 如何以最小的开销做到这一点? This is an extremely highly trafficked endpoint so I'd like to optimize it to be as efficient as possible.
这是一个流量非常高的端点,因此我想对其进行优化以使其尽可能高效。
One thing to consider is an Azure Application Gateway since it supports URL path routing which is what you need to do. 需要考虑的一件事是Azure应用程序网关,因为它支持URL路由,这是您需要做的。 https://docs.microsoft.com/en-us/azure/application-gateway/
https://docs.microsoft.com/en-us/azure/application-gateway/
That might be too much overhead but it would meet your need. 那可能是过多的开销,但可以满足您的需求。
Another option to consider is using the IIS Application Request Routing module on your cloud service. 要考虑的另一个选项是在云服务上使用IIS应用程序请求路由模块。 This support thread and this blog post talk about that approach.
该支持线程和此博客文章讨论了这种方法。 (Warning both are a bit dated)
(警告都有些过时)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.