Re: Best approach for 2-node active-active Kamailio setup
Sergio Charrua via sr-users <[email protected]> Thu, 9 Jul 2026 10:17:33 +0200
| Newsgroups | gmane.comp.voip.ser |
|---|---|
| Message-ID | <CALZWR5xsza0YdSVpn3zvG8Q6Eoe52Dwv8x9x4zDPPajCtO-GdA@mail.gmail.com> |
--===============1966222339== Content-Type: multipart/alternative; boundary="000000000000b1c71a06562943d9" --000000000000b1c71a06562943d9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Benoit! >> it is also the only one which will issue a 'BYE' to terminate a call if the default_timeout is reached. Had the same issue, and in fact, the timeout could be executed on the node that started the call *after* the BYE was processed by the secondary node that processed the rest of the call when Node 1 went berzerk. So we fixed that by have a check on Kamailio to verify if the node is Active. If yes, then timeout should be processed. If not, just ignore. We have active-passive/active-active setup using DMQ, but in the same DC/network and it is working fine. We haven't yet done load performance tests, we need minimum of 2K CAPS per node, but at 200 CAPS it work great (despite some issues with ACK which Stefan identified as a bug on DMQ, apparently). Atenciosamente / Kind Regards / Cordialement / Un saludo, *S=C3=A9rgio Charrua* *www.kahea.ai <http://www.kahea.ai> / www.voip.pt <http://www.voip.pt>* *OpenTelecom* - Consulting for Telecoms, Lda Tel.: +351 <callto:+351+91+104+12+66>91 631 11 44 Email : *[email protected] <[email protected]> / **[email protected] <[email protected]> * This message and any files or documents attached are strictly confidential or otherwise legally protected. 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. On Thu, Jul 9, 2026 at 10:08=E2=80=AFAM Benoit Panizzon via sr-users < [email protected]> wrote: > Hi Asma > > > I am currently deploying a Kamailio SBC infrastructure with 2 nodes, on= e > > per datacenter, and I would like to set them up in active-active mode. > > This was our intention too - we ran into several issues. > > Now we operate in a 'two independent node' set-up but one node can not > take over active calls of the other fails. So it is OK if I want to do > maintenance, so I can 'gracefully' take one node down by having it > reject new calls but continue to process calls with have a toTag until > no more calls are active. > > > I have no experience yet with multi-node Kamailio setups and I would li= ke > > to ask: > > > > 1. What is the recommended approach for a 2-node active-active Kamailio > > deployment today? > > I can only tell the issues I ran into: > > Dialog Module is (my opinion) not quite fit for an active-active set-up > when replicating via DMQ. Reason: There is always one node which > initially processed the call which is the 'master' node for the entire > dialogue - it is also the only one which will issue a 'BYE' to > terminate a call if the default_timeout is reached. > > And I believe there is still what I believe is a bug: If the > default_timeout timer fires on the 'slave' first, all the dialogue > metadata is being deleted from memory (and possibly the backend > database) so the master node never terminates the call, because it > 'forgot' the dialogue. > > Also you would have to make sure you use hostnames in all headers and > not ip addresses as the ip address is specific to one of your nodes and > make sure the hostname resolves to both ip addresses of your > active-active nodes. > > But then again - will your systems outside kamailio be re-sending a > message to the other ip of that hostname if one does not react? > > We also use MySQL as DB backend for dialog and we keep getting > 'orphaned' entries which are not being correctly removed after a > dialogue ends (we have a mysql housekeeping script finding them an > deleting them). > > > 2. What modules or mechanisms should I use to synchronize state between > the > > two nodes (calls, registrations, etc.)? > > DMQ > > > 3. Are there any known issues or limitations I should be aware of befor= e > > starting the configuration? > > Mentioned above. > > Also if anyone has a working active-active - active- failover-able > set-up with dialog - I would be very interested on how they done it > properly. > > Mit freundlichen Gr=C3=BCssen > > -Beno=C3=AEt Panizzon- > -- > I m p r o W a r e A G - Leiter Commerce Kunden > ______________________________________________________ > > Zurlindenstrasse 29 Tel +41 61 826 93 00 > CH-4133 Pratteln Fax +41 61 826 93 01 > Schweiz Web http://www.imp.ch > ______________________________________________________ > __________________________________________________________ > Kamailio - Users Mailing List - Non Commercial Discussions -- > [email protected] > To unsubscribe send an email to [email protected] > Important: keep the mailing list in the recipients, do not reply only to > the sender! > --000000000000b1c71a06562943d9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi Benoit!<div><br></div><div>>> =C2=A0it is also the only one which will issue a 'BYE' to=C2=A0term= inate a call if the default_timeout is reached.</div><div><br></div><div>Ha= d the same issue, and in fact, the timeout could be executed on the node th= at started the call *after* the BYE was processed by the secondary node tha= t processed the rest of the call when Node 1 went berzerk. So we fixed that= by have a check on Kamailio to verify if the node is Active. If yes, then = timeout should be processed. If not, just ignore.</div><div><br></div><div>= We have active-passive/active-active setup using DMQ, but in the same DC/ne= twork and it is working fine.=C2=A0We haven't yet done load performance= tests, we need minimum of 2K CAPS per node, but at 200 CAPS it work great = (despite some issues with ACK which Stefan identified as a bug on DMQ, appa= rently).</div><div><br></div><div><br><div><br clear=3D"all"></div><div><di= v dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature">= <div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div di= r=3D"ltr"><p style=3D"color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-= serif;background-color:rgb(253,253,253)"><span style=3D"font-family:Arial,s= ans-serif">Atenciosamente / Kind Regards / Cordialement / Un saludo,</span>= </p><p style=3D"color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;= background-color:rgb(253,253,253)"><b><span style=3D"font-family:Arial,sans= -serif"><br></span></b></p><p style=3D"color:rgb(0,0,0);margin:0px;font-fam= ily:Calibri,sans-serif;background-color:rgb(253,253,253)"><b><span style=3D= "font-family:Arial,sans-serif">S=C3=A9rgio Charrua</span></b></p><div><div = dir=3D"ltr"><p style=3D"font-size:11pt;color:rgb(0,0,0);margin:0px;font-fam= ily:Calibri,sans-serif;background-color:rgb(253,253,253)"><b><span style=3D= "font-size:9pt;font-family:Arial,sans-serif;color:red"><span style=3D"color= :rgb(0,0,0)"></span><span style=3D"color:rgb(51,102,255)"><a href=3D"http:/= /www.kahea.ai" target=3D"_blank">www.kahea.ai</a> /=C2=A0<a href=3D"http://= www.voip.pt" target=3D"_blank">www.voip.pt</a></span></span></b></p><p styl= e=3D"margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253= ,253)"><span style=3D"font-family:Arial,sans-serif"><span style=3D"font-siz= e:12px"><font color=3D"#000000"><b>OpenTelecom</b> - Consulting for Telecom= s, Lda</font><br></span></span><span style=3D"color:rgb(0,0,0);font-size:x-= small;font-family:Arial,sans-serif">Tel.:=C2=A0<span style=3D"color:rgb(51,= 102,153)"><a href=3D"callto:+351+91+104+12+66" style=3D"color:rgb(51,102,15= 3);text-decoration:none" target=3D"_blank">+351=C2=A0</a>91 631 11 44<br></= span></span><font color=3D"#000000" size=3D"1"><span style=3D"font-family:&= quot;Times New Roman",serif"></span></font></p><p style=3D"font-size:1= 1pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-c= olor:rgb(253,253,253)"><span style=3D"font-size:x-small"><span style=3D"fon= t-family:Arial,sans-serif;color:rgb(187,187,187)"><span style=3D"color:rgb(= 128,128,128)">Email :=C2=A0<strong><a href=3D"mailto:[email protected]= " style=3D"color:rgb(17,85,204)" target=3D"_blank">[email protected]</= a>=C2=A0/=C2=A0</strong></span></span></span><strong style=3D"color:rgb(128= ,128,128);font-family:Arial,sans-serif;font-size:x-small"><a href=3D"mailto= :[email protected]" style=3D"color:rgb(17,85,204)" target=3D"_blank">= [email protected]</a>=C2=A0</strong><span style=3D"font-size:x-small"= ><span style=3D"font-family:Arial,sans-serif;color:rgb(187,187,187)"><br></= span></span></p><table border=3D"0" cellspacing=3D"0" cellpadding=3D"0" wid= th=3D"650" style=3D"width:487.5pt"> <tbody><tr> <td style=3D"padding:0cm"> <p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-family:"Vo= dafone Rg";color:rgb(204,204,204)">This message and any files or documents attached are strictly confidential or otherwis= e legally protected.=C2=A0</span></p><p class=3D"MsoNormal"><span lang=3D"E= N-US" style=3D"font-family:"Vodafone Rg";color:rgb(204,204,204)">= It is intended only for the individual or entity named. If you are not the named addressee or have received this email in error, ple= ase 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 t= hat transmission cannot be guaranteed to be secure or error-free. </span><spa= n lang=3D"EN-US" style=3D"font-family:"Times New Roman",serif"><s= pan></span></span></p> </td> </tr> </tbody></table><p style=3D"color:rgb(0,0,0);margin:0px;font-family:Calibri= ,sans-serif;background-color:rgb(253,253,253)"> <span style=3D"font-family:"Times New Roman",serif"></span></p><p= class=3D"MsoNormal"><span lang=3D"EN-US">=C2=A0</span></p><p style=3D"colo= r:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb= (253,253,253)">=C2=A0</p></div></div><div style=3D"font-size:small"><br><br= ></div></div></div></div></div></div></div></div><br></div></div><br><div c= lass=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_= attr">On Thu, Jul 9, 2026 at 10:08=E2=80=AFAM Benoit Panizzon via sr-users = <<a href=3D"mailto:[email protected]">[email protected].= org</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"marg= in:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1e= x">Hi Asma<br> <br> > I am currently deploying a Kamailio SBC infrastructure with 2 nodes, o= ne<br> > per datacenter, and I would like to set them up in active-active mode.= <br> <br> This was our intention too - we ran into several issues.<br> <br> Now we operate in a 'two independent node' set-up but one node can = not<br> take over active calls of the other fails. So it is OK if I want to do<br> maintenance, so I can 'gracefully' take one node down by having it<= br> reject new calls but continue to process calls with have a toTag until<br> no more calls are active.<br> <br> > I have no experience yet with multi-node Kamailio setups and I would l= ike<br> > to ask:<br> > <br> > 1. What is the recommended approach for a 2-node active-active Kamaili= o<br> > deployment today?<br> <br> I can only tell the issues I ran into:<br> <br> Dialog Module is (my opinion) not quite fit for an active-active set-up<br> when replicating via DMQ. Reason: There is always one node which<br> initially processed the call which is the 'master' node for the ent= ire<br> dialogue - it is also the only one which will issue a 'BYE' to<br> terminate a call if the default_timeout is reached.<br> <br> And I believe there is still what I believe is a bug: If the<br> default_timeout timer fires on the 'slave' first, all the dialogue<= br> metadata is being deleted from memory (and possibly the backend<br> database) so the master node never terminates the call, because it<br> 'forgot' the dialogue.<br> <br> Also you would have to make sure you use hostnames in all headers and<br> not ip addresses as the ip address is specific to one of your nodes and<br> make sure the hostname resolves to both ip addresses of your<br> active-active nodes.<br> <br> But then again - will your systems outside kamailio be re-sending a<br> message to the other ip of that hostname if one does not react?<br> <br> We also use MySQL as DB backend for dialog and we keep getting<br> 'orphaned' entries which are not being correctly removed after a<br= > dialogue ends (we have a mysql housekeeping script finding them an<br> deleting them).<br> <br> > 2. What modules or mechanisms should I use to synchronize state betwee= n the<br> > two nodes (calls, registrations, etc.)?<br> <br> DMQ<br> <br> > 3. Are there any known issues or limitations I should be aware of befo= re<br> > starting the configuration?<br> <br> Mentioned above.<br> <br> Also if anyone has a working active-active - active- failover-able<br> set-up with dialog - I would be very interested on how they done it<br> properly.<br> <br> Mit freundlichen Gr=C3=BCssen<br> <br> -Beno=C3=AEt Panizzon-<br> -- <br> I m p r o W a r e=C2=A0 =C2=A0A G=C2=A0 =C2=A0 -=C2=A0 =C2=A0 Leiter Commer= ce Kunden<br> ______________________________________________________<br> <br> Zurlindenstrasse 29=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Tel=C2= =A0 +41 61 826 93 00<br> CH-4133 Pratteln=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Fax= =C2=A0 +41 61 826 93 01<br> Schweiz=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0Web=C2=A0 <a href=3D"http://www.imp.ch" rel=3D"nore= ferrer" target=3D"_blank">http://www.imp.ch</a><br> ______________________________________________________<br> __________________________________________________________<br> Kamailio - Users Mailing List - Non Commercial Discussions -- <a href=3D"ma= ilto:[email protected]" target=3D"_blank">[email protected]= .org</a><br> To unsubscribe send an email to <a href=3D"mailto:[email protected]= ilio.org" target=3D"_blank">[email protected]</a><br> Important: keep the mailing list in the recipients, do not reply only to th= e sender!<br> </blockquote></div> --000000000000b1c71a06562943d9-- --===============1966222339== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender! --===============1966222339==--