gpt4 book ai didi

azure - Azure 负载均衡器是否允许连接耗尽

转载 作者:行者123 更新时间:2023-12-05 05:25:54 27 4
gpt4 key购买 nike

我似乎找不到任何相关文档。

如果连接耗尽不可用,该如何进行零停机部署?

最佳答案

Rick Rainey已回复essentially the same question关于服务器故障。他指出:

The recommended way to do this is to have a custom health probe in your load balanced set. For example, you could have a simple healthcheck.html page on each of your VM's (in wwwroot for example) and direct the probe from your load balanced set to this page. As long as the probe can retrieve that page (HTTP 200), the Azure load balancer will keep sending user requests to the VM.

When you need to update a VM, then you can simply rename the healthcheck.html to a different name such as _healthcheck.html. This will cause the probe to start receiving HTTP 404 errors and will take that machine out of the load balanced rotation because it is not getting HTTP 200. Existing connections will continue to be serviced but the Azure LB will stop sending new requests to the VM.

After your updates on the VM have been completed, rename _healthcheck.html back to healthcheck.html. The Azure LB probe will start getting HTTP 200 responses and as a result start sending requests to this VM again.

Repeat this for each VM in the load balanced set.

但请注意,Microsoft 的 Kevin Williamson 在他的 MSDN 博客文章 Heartbeats, Recovery, and the Load Balancer 中指出,“确保您的探测路径不是简单的 HTML 页面,而是实际上包含确定服务运行状况的逻辑(例如,尝试连接到您的 SQL 数据库)。”因此,您实际上可能需要一个可以检查多个因素的 aspx 页面,包括您放置在某处的自定义“drain”标志。

关于azure - Azure 负载均衡器是否允许连接耗尽,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29086984/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com