Hello Alex,

I did not looked that closely, sorry. Maybe somebody else can comment as well.

My suggestion would be to try on a small (i.e. low children count) test setup 
and look e.g. with some "strace" tools inside the process and see actually what 
is happening.

Cheers,

Henning

-----Original Message-----
From: sr-users <[email protected]> On Behalf Of Alex Balashov
Sent: Tuesday, January 11, 2022 4:25 PM
To: Kamailio (SER) - Users Mailing List <[email protected]>
Subject: Re: [SR-Users] EVAPI workload allocation across processes

Thanks, Henning! So, does this mean that all messages over a given connection 
are always received in the same EvAPI worker process? Or does the dispatcher 
hold the connections, process the messages, and then allocate these messages in 
a RR/pseudorandom fashion among one or more EvAPI worker processes?

The latter was my understanding, but you said: "The dispatcher process 
accept(..) the connections and then pass them to the worker processes for 
further processing.”

That particular formulation had me wondering if the connections themselves are 
handed off to workers, or just the messages.

— Alex

> On Jan 11, 2022, at 10:09 AM, Henning Westerholt <[email protected]> wrote:
> 
> Hi Alex,
> 
> not the author of this module - but I think you are right after having 
> briefly looked to the code. The dispatcher process accept(..) the connections 
> and then pass them to the worker processes for further processing. 
> 
> Cheers,
> 
> Henning
> 
> --
> Henning Westerholt – https://skalatan.de/blog/ Kamailio services – 
> https://gilawa.com
> 
> -----Original Message-----
> From: sr-users <[email protected]> On Behalf Of Alex 
> Balashov
> Sent: Sunday, January 2, 2022 3:54 AM
> To: Kamailio (SER) - Users Mailing List <[email protected]>
> Subject: [SR-Users] EVAPI workload allocation across processes
> 
> Hi,
> 
> Given several EVAPI worker processes:
> 
>   modparam("evapi", "workers", 4)
> 
>   # kamcmd -s /run/kamailio/kamailio_ctl ps | fgrep -i evapi
>   539257      EvAPI Dispatcher
>   539258      EvAPI Worker
>   539259      EvAPI Worker
>   539260      EvAPI Worker
>   539261      EvAPI Worker
> 
> How should one understand the way that the EVAPI workload is allocated among 
> them?
> 
> My best guess is that the EvAPI dispatcher process is the sole accept()or of 
> client connections and the place where all relaying to client connections is 
> done, regardless of their number, and that the ‘workers’ represent an async 
> pool of processes in which TM transactions can be resumed or other work can 
> be done when an outside caller sends a message to the dispatcher.
> 
> However, the documentation[1] is a little vague on the meaning of the 
> ‘workers’ modparam:
> 
>   "Number of worker processes to be started to handle incoming messages from 
> remote applications.”
> 
> Or maybe it’s not. Just wanted to confirm that my understanding is correct.
> 
> Thanks!
> 
> — Alex
> 
> [1] 
> https://kamailio.org/docs/modules/5.5.x/modules/evapi.html#evapi.p.wor
> kers
> 
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> 
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>  * [email protected]
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
>  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/


__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to