Does AWS support weighted load balancing?

Does AWS support weighted load balancing?

From what I can see ELB only supports circular load balancing (no custom weights). However, I have not found any reliable documentation.


The easiest thing I can think of is to put a load balancer in front of it like Nginx, for example:

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

      

Here, out of seven requests, one will go to backend1, two to backend2 and four to backend4.

It will work, but it also means that you need to configure your Nginx server to do just that. If AWS will directly support weighted load balancing that will be much easier to set up.

+3


source to share


3 answers


How elastic load balancing works on the documentation page:

When using a classic load balancer, the node load balancer that receives the request selects the registered instance using the round robin routing algorithm for TCP listeners and the least outstanding request routing algorithm for HTTP and HTTPS listeners .

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

Elastic Load Balancing does not support weighted round-robin (where you specify the weights).



You can use Amazon Route 53 with a Weighted Routing Policy . From the documentation page Select Routing Policy :

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

+2


source


You can use Route53 weight routing directly to your servers or multiple ELBs



+2


source


If you are using AWS Route 53 as your DNS service, you can configure the age of age in the DNS record.

DNS weight see 2.2

Amazon Route 53 supports Weighted Round Robin. Weighted Round Robin allows you to assign weights to resource record sets to indicate the frequency with which different responses are submitted. You might want to use this opportunity for A / B testing by sending a small portion of the traffic to the server where you changed the software. For example, suppose you have two sets of records associated with one DNS name - one with weight 3 and one with weight 1. In this case 75% Route 53 will return a set of records with weight 3 and 25% of Route 53 will return set of records with weight 1. The scale can be any number from 0 to 255.

+2


source







All Articles