On 2013-7-21 16:53, Willy Tarreau wrote:
Hi Godbach,

I carefully checked and for me we can set SRV_UWGHT_MAX to SRV_UWGHT_RANGE.
It will have the effect of limiting the maximum number of servers a full
weight to 4095 instead of 4128 (so please update the doc for this). It is
also used in the leastconn algorithm, and similarly, the effective max
number of connections per server without overflowing will be limited to
1048575 instead of 1052688 (this is not a big issue).

So yeah, please go ahead and send a fix for this by. Please also replace
4128 with 4095 in the documentation!



Hi Willy,

For roundrobin algo, the max mumber of servers is caculated by the formula
2^32/255^2/scale ~= 66051/scale

With scale is 16 and SRV_WGHT_MAX is 255, the result is 4128.

If SRV_WGHT_MAX is set to 256, the max number should be:
2^32/256^2/16 = 65536/16 = 4096

But you said this value should be 4095. I am confused by it.

--
Best Regards,
Godbach


Reply via email to