1
votes

I'm reading a AWS_Blue_Green_Deployments paper here, and trying to understand next:

When it’s time to deploy, you simply attach the green group to the existing load balancer to introduce traffic to the new environment. For HTTP/HTTPS listeners, the load balancer favors the green Auto Scaling group because it uses a least outstanding requests routing algorithm, as explained in the Elastic Load Balancing Developer Guide.

Unfortunately - I can't see an explanation (or - just can't understand it) in the Elastic Load Balancing Developer Guide here.

Could somebody please explain this part:

the load balancer favors the green Auto Scaling group because it uses a least outstanding requests routing algorithm

Why will ELB favor newly attached ASG for traffic? What is "a least outstanding requests routing algorithm" here/in AWS?

1

1 Answers

13
votes

The ELB documentation was recently refactored with the introduction of ELB-V2, called Application Load Balancer. The former offering is now called Classic. There does not appear to be an explicit reference in the docs to the phrase you're looking for, but consider this:

By default, a Classic Load Balancer routes each request independently to the registered instance with the smallest load.

http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html

A "least outstanding requests routing algorithm" is an algorithm that choses which instance receives the next request by selecting the instance that, at that moment, has the lowest number of outstanding (pending, unfinished) requests.

Since newly added instances would initially be handling no requests, they would be heavily favored for new requests until the point when their workload aproaches the workload of the instances that were already actively handling requests. Idle (underutilized) instances are favored until the load is balanced, at which time the instances are all going to be treated equally.