<div dir="ltr">Hello Daniel,<div><br></div><div>Thank you for the explanation!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">чт, 10 груд. 2020 о 15:04 Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> пише:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hello,</p>
<p>that's how the algorithm is implemented and the last one has more
calls because it is used to fill the slots left empty because of
truncation in percentage computation.</p>
<p>The weight is a percentage as an integer value, practically an
integer from 1 to 100.</p>
<p>So, if you have 16 gateways to route to with dispatcher, each
with weight 50, then the sum of weights is 800. The percentage
corresponding to each gateway is computed with (50/800)*100 =
6.25, converted to integer is 6.</p>
<p>Now, 6*16=96, so 4 slots were left empty, which are filled with
the last destination that results in 10 slots for it.</p>
<p>I haven't implemented the rweight algorithm, but for the weight
algorithm is expected to set the value to an integer from 1 to 100
and have the sum of them to be 100, otherwise also the last
gateway fills the empty slots. Moreover, if the sum exceeds 100,
then the gateways that end up after the 100 slots will be ignored.</p>
<p>Note that there are other algorithms if you want even
distribution, like round robin or call load balancing.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 10.12.20 12:00, Sergio Charrua
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I noticed the exact same behaviour with my
implementation, even though the priority and rweight are
different.
<div>until now, i'm ignoring the "issue". But if there is a fix,
I would like to know too.</div>
<div><br clear="all">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<p style="color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><b><span style="font-family:Arial,sans-serif">Sérgio
Charrua</span></b><br>
</p>
<div>
<div dir="ltr">
<p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><img src="http://cdn.shopify.com/s/files/1/0380/5305/t/11/assets/logo.png?11469850511917603945" width="96" height="32"><b><span style="font-size:9pt;font-family:Arial,sans-serif"><br>
</span></b></p>
<p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><b><span style="font-size:9pt;font-family:Arial,sans-serif;color:red"><span style="color:rgb(0,0,0)"></span><span style="color:rgb(51,102,255)"><a href="http://www.voip.pt/" style="color:rgb(17,85,204)" target="_blank">www.voip.pt</a></span></span></b><span style="font-size:x-small"><span style="font-family:Arial,sans-serif;color:rgb(136,136,136)"><br>
</span><span style="font-family:Arial,sans-serif">Tel.: <span style="color:rgb(51,102,153)"><a href="callto:+351+91+104+12+66" style="color:rgb(51,102,153);text-decoration:none" target="_blank">+351 </a>21
130 71 77<br>
</span></span><span></span></span></p>
<p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><span style="font-size:x-small"><span style="font-family:Arial,sans-serif;color:rgb(187,187,187)"><span style="color:rgb(128,128,128)">Email
: <strong><a href="mailto:sergio.charrua@voip.pt" style="color:rgb(17,85,204)" target="_blank">sergio.charrua@voip.pt</a></strong></span><br>
</span></span></p>
<table style="width:487.5pt" width="650" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="padding:0cm">
<p class="MsoNormal"><span lang="EN-US">This message and
any files or documents attached
are strictly confidential or
otherwise legally protected. </span></p>
<p class="MsoNormal"><span lang="EN-US">It is intended only
for the individual or entity
named. If you are not the named
addressee or have received this
email in error, please inform
the sender immediately, delete
it from your system and do not
copy or disclose it or its
contents or use it for any
purpose. Please also note that
transmission cannot be
guaranteed to be secure or
error-free. </span><span lang="EN-US"><span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p style="color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><span></span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p style="color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"> </p>
</div>
</div>
<div style="font-size:small"><br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Dec 10, 2020 at 10:20
AM Володимир Іванець <<a href="mailto:volodyaivanets@gmail.com" target="_blank">volodyaivanets@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hello all!
<div><br>
</div>
<div>We are running Kamailio version 5.3.3 with 16 small
Asterisk servers. Kamailio uses a dispatcher module to
distribute calls. Algorithm #11 is selected. All
destinations are configured with priority set to 50 and
attribute to rweight=50.<br>
</div>
<div><br>
</div>
<div>We noticed that one server constantly receives more
calls than others. I run a few tests. I was sending 1000
calls to the system. 4 per second. All servers except one
were getting around 60 calls while the last one - around
100.</div>
<div><br>
</div>
<div>I then noticed that the server which receives most
calls is always last in the "kamcmd dispatcher.list"
command output. I then changed the order in the dispatcher
DB table and repeat the test. The other server that now
was last was getting the most calls.</div>
<div><br>
</div>
<div>Does anyone else use algorithm #11 and finds the same
thing? Is there something additional that I can provide to
help with the investigation?</div>
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank">https://www.paypal.me/dcmierla</a></pre>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>