Re: balance by selecting host with lowest latency?

From: Wout Mertens <wout.mertens#gmail.com>
Date: Tue, 6 Dec 2011 22:30:07 +0100

On Dec 6, 2011, at 21:58 , Allan Wind wrote:

> On 2011-12-06 21:38:40, Wout Mertens wrote:

>> So if you're doing HTTP load balancing for app servers, it seems to me that the server that responded fastest last time should get the job.
>> 
>> HAproxy is already capturing the response times at each request so I think this would allow for really responsive fair load balancing.

>
> Would that algorithm not be subject to oscillations? First we
> send n requests to backend 1, then we send n requests to backend
> 2 as 1 is now slow.
>
> If n is big enough would this not cause cascade of backend
> failures? Opposed to spreading out the load over all backends.

Hmmm good point… Some sort of damping algorithm would be needed.

For example, the rolling response time of the last 10 requests should be used.

Additionally, the response time could change the server weight instead, and connections would be delivered according to the normal weighing algorithm. So when you have 2 servers and one is much faster, both servers gradually get a weight that corresponds to their speed. In a stable situation, weight*avg response time would be equal for all servers.

Wout. Received on 2011/12/06 22:30

This archive was generated by hypermail 2.2.0 : 2011/12/06 22:45 CET