gpt4 book ai didi

amazon-web-services - AWS是否支持加权负载平衡?

转载 作者:行者123 更新时间:2023-12-04 10:34:55 25 4
gpt4 key购买 nike

AWS本身是否支持加权负载平衡?

从我看来,ELB仅支持循环负载平衡(没有任何可配置的权重)。不过,我还没有找到可靠的文档。

我能想到的最简单的方法是在其前面放置一个像Nginx这样的负载均衡器,例如:

upstream backend  {
server backend1.example.com weight=1;
server backend2.example.com weight=2;
server backend3.example.com weight=4;
}

在此,在七个请求中,一个将去往后端1,两个将去往后端2,四个将去往后端4。

它可以工作,但是这也意味着您必须为此使用Nginx设置服务器。如果AWS直接支持加权负载平衡,则设置起来会容易得多。

最佳答案

How Elastic Load Balancing Works文档页面指出:

With a Classic Load Balancer, the load balancer node that receives the request selects a registered instance using the round robin routing algorithm for TCP listeners and the least outstanding requests routing algorithm for HTTP and HTTPS listeners.

With an Application Load Balancer, the load balancer node that receives the request evaluates the listener rules in priority order to determine which rule to apply, and then selects a target from the target group for the rule action using the round robin routing algorithm. Routing is performed independently for each target group, even when a target is registered with multiple target groups.



Elastic Load Balancement服务 不支持加权轮询(您在其中指定权重),但不支持

您可以将Amazon Route 53与加权路由策略一起使用。在Choosing a Routing Policy文档页面中:

Use the weighted routing policy when you have multiple resources that perform the same function (for example, web servers that serve the same website) and you want Amazon Route 53 to route traffic to those resources in proportions that you specify (for example, one quarter to one server and three quarters to the other).

关于amazon-web-services - AWS是否支持加权负载平衡?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44412134/

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