Re: What is the formula for the weight algorithm?

From: Thomas Eckhardt <>
Date: Wed, 28 Jan 2009 13:00:11 +0100

Tobias Gablunsky wrote:
> Can please anyone explain the used algorithm in short?

from pen.c:

load = (WEIGHT_FACTOR*servers[i].c)/servers[i].weight;

where WEIGHT_FACTOR is by default defined as 256 ("to make weight kick
in earlier"). server[i].c are the numbers of connections which are
currently assigned to server [i]. servers[i].weight is of course the
weight-value you defined to this server.
The server with the smallest value of "load" is selected for a
particular request.

Received on Wed Jan 28 2009 - 13:00:49 CET

This archive was generated by hypermail 2.2.0 : Wed Jan 28 2009 - 13:00:49 CET