i checked algo 11. it's copy/pasted algo 9 with weights array reinit on destination state changes.
yes. algo 11 will work correctly because weights array will not contain inactive destinations
and previously mentioned inactive destinations skipping loop with bug will never be taken.

but from my point of view:
algo 9 improperly distributes load when we have inactive destinations and it's definitely a bug.
so right steps are fix it or completely replace in favor of algo 11.
and in case of replacement get rid of two actually identical 'weight' and 'rweight' destination attributes and leave one clear attribute 'weight'.

On 12/15/2015 07:33 PM, Dmitri Savolainen wrote:
HI. 
What about alg '11' and rweght parameter?
Do you mean this?
https://github.com/kamailio/kamailio/pull/219

2015-12-15 12:31 GMT+03:00 Michael Furmur <m.furmur@gmail.com>:
dispatcher module doing wrong when skipping inactive nodes on weighted
load distribution usage ( alg 9 )

here:
https://github.com/kamailio/kamailio/blob/master/modules/dispatcher/dispatch.c#L1919
loop iterates over possible destinations to get first active after
previously computed destination if it inactive.

this works for all balancing algorythms except of 9 (weighted balancing),
because on failover it ignores idx->wlist array and chooses next
destination ignoring weights.
thus we will get all traffic for inactive destination on the destination
which next by destinations index.

suggested patch changes behavior to continue to iterate over idx->wlist
on inactive destinations skipping for alg 9.

please, examine and apply.

--
Regards
Michael Furmur


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev




--
Savolainen Dmitri


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-- 
br
Michael Furmur