(no title)
plasma | 2 years ago
AWS ALB (and others I'm sure) can balance by "Least outstanding requests" [1] which means a server with the least in-flight HTTP requests (not keep-alive network connections!) to an app server will be chosen.
If the balancer operates on the network level (eg NLB) and it maintains keep-alive connections to servers, the balancing won't be as even from a HTTP request perspective because a keep-alive connection may or may not be processing a request right now and so the request will be routed based on number of TCP connections to app servers, not current HTTP request activity to them.
[1] https://docs.aws.amazon.com/elasticloadbalancing/latest/appl...
joosters|2 years ago
[Also, to be pedantic, it should really be called "fewest requests" - but I've never seen a product call it that!]