<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hello,</p>
<p>I noticed a couple of strange behaviors, using this version :
kamailio-5.3.3-4.1.x86_64<br>
<br>
I am using algorithm "0". Hash over Call-ID. The reason for that
is that I am just re-sending the message, using send_udp(), to a
destination in a group from file dispatcher.list. Kamailio is
completely stateless, it does not need to remember anything. And
using a hash over Call-ID I can be sure that any other message
related to the same call will be sent to the same destination :
retransmissions of the INVITE, CANCEL, ACK, BYE, etc.<br>
<br>
I general, it works, but I detected two problems.<br>
<br>
I have a group of 5 destinations, where every server is running at
80% of the nominal load. It's a 4 + 1 configuration, for
redundancy. I know it's not 100% evenly distributed using hash
over Call-ID, but in practice it's almost perfectly even.<br>
<br>
However, if one node is down, instead of having the four alive
running at 100%, I get three running still at 80% capacity, and
one is sent 160% of the load (which of course can't process). it
seems, all traffic that was supposed to be sent to the failed node
is transferred to the same unique destination.<br>
<br>
That implementation makes my solution for redundancy worthless.</p>
<p>Why didn't the implementation use, for instance, a re-hash over
the hash? That would allow to redistribute "evenly" over the
remaining servers. <br>
<br>
I tried to solve this by repeating the entries in dispatcher.list,
as I noticed that kamailio doesn't check if different lines
contain duplicated uris. For instance, if I have two lines with
"destination A", and one line with "destination B", like this:<br>
<br>
<tt>0 sip:server_A</tt><tt><br>
</tt><tt>
0 sip:server_A</tt><tt><br>
</tt><tt>
0 sip:server_B</tt></p>
<p>I see that "destination A" receives twice the amount of SIP
OPTIONS that "destination B" receives. <br>
</p>
<p>And so, I used this dispatcher.list :<br>
<br>
<tt>0 sip:server_1</tt><tt><br>
</tt><tt>0 sip:server_2</tt><tt><br>
</tt><tt>0 sip:server_3</tt><tt><br>
</tt><tt>0 sip:server_4</tt><tt><br>
</tt><tt>0 sip:server_5</tt><tt><br>
</tt><tt>0 sip:server_1</tt><tt><br>
</tt><tt>0 sip:server_3</tt><tt><br>
</tt><tt>0 sip:server_5</tt><tt><br>
</tt><tt>0 sip:server_2</tt><tt><br>
</tt><tt>0 sip:server_4</tt><tt><br>
</tt><tt>0 sip:server_1</tt><tt><br>
</tt><tt>0 sip:server_4</tt><tt><br>
</tt><tt>0 sip:server_2</tt><tt><br>
</tt><tt>0 sip:server_5</tt><tt><br>
</tt><tt>0 sip:server_3</tt><tt><br>
</tt><tt>0 sip:server_1</tt><tt><br>
</tt><tt>0 sip:server_5</tt><tt><br>
</tt><tt>0 sip:server_4</tt><tt><br>
</tt><tt>0 sip:server_3</tt><tt><br>
</tt><tt>0 sip:server_2</tt><br>
<br>
(it's not a random order. It follows a sequence)<br>
<br>
I thought : "what a genius I am. This way, if any node fails, and
kamailio select the "next" to send the traffic to, it will
distribute evenly over the rest".<br>
<br>
It doesn't work. I detected something that looks like a bug.<br>
<br>
If one entry is repeated at least once, for instance :<br>
<br>
0 sip:server_1<br>
0 sip:server_1<br>
0 sip:server_2<br>
0 sip:server_3<br>
0 sip:server_4<br>
0 sip:server_5<br>
<br>
if server_1 is down, kamailio still sends some of the INVITEs to
it. Not all of them, but many. I can see the SIP OPTIONS been
sent to it, and the response "ICMP Destination Unreachable", so
Kamailio knows that server_down. However, still sends INVITE
requests to that failed node. Look at this trace :<br>
<br>
<img src="cid:part1.06BD4D34.44E8DF8B@sixbell.com" alt=""><br>
<br>
You can see all the failed SIP OPTIONS. Still, kamailio sends
traffic to that server. <br>
<br>
It does not send traffic to a failed destination if it's listed
only once in dispatcher.list<br>
<br>
Any ideas?<br>
<br>
Thanks in advance,<br>
</p>
<p>Luis<br>
<br>
</p>
<pre class="moz-signature" cols="72">--
Luis Rojas
Software Architect
Sixbell
Los Leones 1200
Providencia
Santiago, Chile
Phone: (+56-2) 22001288
<a class="moz-txt-link-freetext" href="mailto:luis.rojas@sixbell.com">mailto:luis.rojas@sixbell.com</a>
<a class="moz-txt-link-freetext" href="http://www.sixbell.com">http://www.sixbell.com</a></pre>
</body>
</html>