[sr-dev] dispatcher module. weight based load distribution issue

Michael Furmur m.furmur at gmail.com
Mon Dec 14 11:44:32 CET 2015


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dispatcher_weighted_balancing_inactive_skip_fix.patch
Type: text/x-patch
Size: 2057 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20151214/dc280587/attachment.bin>


More information about the sr-dev mailing list