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




upstream backend  {
  server weight=1;
  server weight=2;
  server weight=4;



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平衡服务不支持加权循环(您指定权重).

您可以将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是否支持加权负载平衡? - 代码日志