gpt4 book ai didi

azure - 负载均衡器如何决定如何路由请求?

转载 作者:行者123 更新时间:2023-12-03 05:08:19 26 4
gpt4 key购买 nike

标题几乎说明了一切:假设我在一个云服务的端口 80 上创建了 3 个具有负载平衡的虚拟机。现在有一个对云服务的请求:负载均衡器如何决定将该请求路由到这 3 个 VM 中的哪一个?是否有特定的指标,或者负载均衡器是否随机路由?

最佳答案

Microsoft Azure Load Balancer is a Layer-4 type load balancer. Microsoft Azure load balancer distributes load among a set of available servers (virtual machines) by computing a hash function on the traffic received on a given input endpoint. The hash function is computed such that all the packets from the same connection (TCP or UDP) end up on the same server. The Microsoft Azure Load Balancer uses a 5 tuple (source IP, source port, destination IP, destination port, protocol type) to calculate the hash that is used to map traffic to the available servers. The hash function is chosen such that the distribution of connections to servers is fairly random. However, depending on traffic pattern, it is possible for different connections to get mapped to the same server.

完整详细信息:https://azure.microsoft.com/en-us/blog/microsoft-azure-load-balancing-services/

关于azure - 负载均衡器如何决定如何路由请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33372382/

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