Azure Functions Traffic Manager

时光总嘲笑我的痴心妄想 提交于 2019-12-18 18:01:22

问题


I'm trying to set up some sort of traffic managing so I can have zero downtime while updating my Azure functions. I'd like to have a West US and a East US that I can divert traffic while I publish. I can't seem to get it to work with Azure functions.


回答1:


So the answer I arrived to after Traffic manager didntsupport Azure functions was to overall build 3 Azure functions. I built an East and a West that has my azure function code on it. Then I built a main Azure Function that has 0 code. It only has Azure proxies on it that route to my 2 other Azure Functions. The route is controlled by a variable in the proxy string that is help in the main API app settings. Using %myvariable% you can set part of the url. When I need to publish I switch the variable to the secondary URL location. Update the Primary and then switch the URL to its original primary location. This will have to work for now till traffic manager is integrated into functions or a better solution arises. Hopes this helps anyone else that was stuck!




回答2:


Although it's not with Azure Traffic Manager, you can solve you problem using Azure Functions Proxy. All you need to do is implement a kind of flag to check if the function is available or not, before route the traffic to that.

http://www.c-sharpcorner.com/article/reverse-proxy-using-azure-functions-proxies/



来源:https://stackoverflow.com/questions/42834857/azure-functions-traffic-manager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!