<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
i checked algo 11. it's copy/pasted algo 9 with weights array reinit
on destination state changes.<br>
yes. algo 11 will work correctly because weights array will not
contain inactive destinations<br>
and previously mentioned inactive destinations skipping loop with
bug will never be taken.<br>
<br>
but from my point of view:<br>
algo 9 improperly distributes load when we have inactive
destinations and it's definitely a bug.<br>
so right steps are fix it or completely replace in favor of algo 11.<br>
and in case of replacement get rid of two actually identical
'weight' and 'rweight' destination attributes and leave one clear
attribute 'weight'.<br>
<br>
On 12/15/2015 07:33 PM, Dmitri Savolainen wrote:<br>
<blockquote
cite="mid:CAGYSiDi_ccFpBcbZxbZEQWy1KTPmd9Pd6hE1msuKmimDpmqHmA@mail.gmail.com"
type="cite">
<div dir="ltr">HI.
<div>What about alg '11' and rweght parameter?
<div>Do you mean this?</div>
<div><a moz-do-not-send="true"
href="https://github.com/kamailio/kamailio/pull/219">https://github.com/kamailio/kamailio/pull/219</a><br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-12-15 12:31 GMT+03:00 Michael
Furmur <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:m.furmur@gmail.com" target="_blank">m.furmur@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">dispatcher
module doing wrong when skipping inactive nodes on weighted<br>
load distribution usage ( alg 9 )<br>
<br>
here:<br>
<a moz-do-not-send="true"
href="https://github.com/kamailio/kamailio/blob/master/modules/dispatcher/dispatch.c#L1919"
rel="noreferrer" target="_blank">https://github.com/kamailio/kamailio/blob/master/modules/dispatcher/dispatch.c#L1919</a><br>
loop iterates over possible destinations to get first active
after<br>
previously computed destination if it inactive.<br>
<br>
this works for all balancing algorythms except of 9
(weighted balancing),<br>
because on failover it ignores idx->wlist array and
chooses next<br>
destination ignoring weights.<br>
thus we will get all traffic for inactive destination on the
destination<br>
which next by destinations index.<br>
<br>
suggested patch changes behavior to continue to iterate over
idx->wlist<br>
on inactive destinations skipping for alg 9.<br>
<br>
please, examine and apply.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Regards<br>
Michael Furmur<br>
<br>
</font></span><br>
_______________________________________________<br>
sr-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev"
rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>Savolainen Dmitri</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
br
Michael Furmur</pre>
</body>
</html>