Azure Functions交通管理器 [英] Azure Functions Traffic Manager

查看:72
本文介绍了Azure Functions交通管理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置某种流量管理,以便在更新Azure功能时可以将停机时间设为零.我希望有一个美国西部和一个美国东部,我可以在发布时转移访问量.我似乎无法使其与Azure函数一起使用.

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.

推荐答案

因此,在Traffic Manager不支持Azure功能之后,我得出的答案是整体构建3个Azure功能.我构建了一个东西方的代码,上面有我的天蓝色功能代码.然后,我建立了一个具有0个代码的主要Azure函数.它只有路由到我的其他两个Azure函数的Azure代理.路由由代理字符串中的变量控制,这是主要API应用设置中的帮助.使用%myvariable%您可以设置部分网址.当我需要发布时,将变量切换到辅助URL位置.更新主要服务器,然后将URL切换到其原始主要位置.在将流量管理器集成到功能中或出现更好的解决方案之前,这必须暂时进行.希望这对其他陷入困境的人有所帮助!

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!

这篇关于Azure Functions交通管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆