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

Cody Herzog CHerzog at IntouchHealth.com
Fri Feb 23 22:24:04 CET 2018


Thanks.

Regarding UDP, that all makes sense.

For my short-term needs, to minimize risk and infrastructure changes, it looks like the ASYNC module will work.

Here's the basic outline of what I'm doing:

--------
async_workers=8

route
{
                route(CHECK_IS_EXPENSIVE_OPERATION);

                if ($var(isExpensiveOperation))
                {
                                async_task_route("COMMON");
                }
                else
                {
                                route(COMMON);
                }
}

route[COMMON]
{
                # Do all my normal routing logic.
}
--------

I detect at the very top of the main route whether the operation will be expensive.
If so, I process the message with an async worker.
If not, I directly process the message on the TCP worker.

The rest of the routing logic remains unchanged.
The only difference is that I execute the expensive operations using the async workers.

It's not the prettiest thing in the world, but it seems like an OK short-term fix to relieve pressure.
I will revisit the bigger architectural ideas in a later phase.

Thanks again for all your help and good ideas.

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


More information about the sr-users mailing list