[SR-Users] How are SIP messages divided amongst TCP workers?

Cody Herzog CHerzog at IntouchHealth.com
Fri Feb 23 19:00:22 CET 2018


Hello.

I'm curious as to how SIP messages received over TLS are divided amongst the available TCP workers.

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.

However, with my configuration, it seems that the work is load balanced at the TCP connection level.

I will now elaborate on my basic architecture.

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.

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.

Does that sound like expected behavior?

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.

Perhaps I'm doing something bad in my config file that is preventing the load balancing from working at the SIP message level.

If that behavior is expected, is there anything I can do to achieve more even load balancing?

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.

Does that sound reasonable?

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.

Thanks.
    -Cody
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180223/bcd854f4/attachment.html>


More information about the sr-users mailing list