Azure Functions 流量管理器 [英] Azure Functions Traffic Manager

查看:12
本文介绍了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 代理,可以路由到我的其他 2 个 Azure Functions.路由由代理字符串中的一个变量控制,该变量在主 API 应用程序设置中有帮助.使用 %myvariable% 您可以设置部分 url.当我需要发布时,我将变量切换到辅助 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天全站免登陆