<div><div dir="auto">Cody,</div><div dir="auto"><br></div><div dir="auto"> Kamailio should receive from normal TCP /</div><div dir="auto">Kernel stack handoff - you may be able to do some tuning with sysctl - however one alternate suggestion that could help spread load on actual Kamailio TCP workers is by firing up additional workers on alternate ports but this still would not ensure that any given worker is executed on unique cpu cores. With this said however the kernel should likely do a efficient job of this already in the handoff between TCP stack and Kamailio.</div><div dir="auto"><br></div><div dir="auto">Is there a reason you feel there is an efficiency issue? Perhaps better knowing any current limitations could help better provide suggestions for your specific situation.</div><br><div class="gmail_quote"><div>On Fri, Feb 23, 2018 at 10:01 AM Cody Herzog <<a href="mailto:CHerzog@intouchhealth.com">CHerzog@intouchhealth.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_5881429840839367201WordSection1">
<p class="MsoNormal">Hello.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I'm curious as to how SIP messages received over TLS are divided amongst the available TCP workers.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Based on some searching, I was hoping and expecting that the messages would be load balanced amongst the TCP workers at the level of individual SIP messages.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">However, with my configuration, it seems that the work is load balanced at the TCP connection level.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I will now elaborate on my basic architecture.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have several edge proxies to which the clients connect. Those proxies do not handle registration, or do much of anything, they just forward traffic to a central registrar server.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">On the central registrar server, it seems that a particular TCP worker is assigned to handle all the traffic arriving from a particular edge proxy. As long as the TCP connection between the servers remains open, it seems that the particular
worker is locked into handling all traffic on that connection.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Does that sound like expected behavior?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">That behavior is not ideal for me, because I would like to evenly divide the SIP message load across all the TCP workers on my central registrar.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Perhaps I'm doing something bad in my config file that is preventing the load balancing from working at the SIP message level.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">If that behavior is expected, is there anything I can do to achieve more even load balancing?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Perhaps the ASYNC module might work for my needs. It seems like I could use async_task_route() to divide certain messages evenly amongst the async workers.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Does that sound reasonable?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">In my use case, certain messages require a lot of CPU time to perform crypto calculations, and I want those calculations to be distributed evenly across all CPU cores.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks.<u></u><u></u></p>
<p class="MsoNormal"> -Cody<u></u><u></u></p>
</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></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Sent from Gmail Mobile</div>