[OpenSIPS-Users] load_balancer usage counter
Bogdan-Andrei Iancu
bogdan at opensips.org
Fri Feb 2 14:37:30 UTC 2024
Hi Callum,
I can confirm the module increments its internal load with each call, so
you are good to go. Still, I do not understand why using the FS
heartbeat here? are the FS servers receiving calls from other
destination than OpenSIPS too ?
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
https://www.siphub.com
On 30.01.2024 16:27, Callum Guy wrote:
> Hi All,
>
> I'm implementing the load_balancer module on a very busy system where
> thousands of calls may arrive in a matter of seconds. The module is
> configured to receive heartbeats every 1 second from many freeswitch
> servers, I have this set as a low value to try and keep OpenSIPs up to
> date with the real call load, as close to real time as possible.
>
> All servers exist in a single group "channels" to keep the initial
> implementation simple. When I kick off the session I use lb_start(1,
> "channels", "rs") and if that destination fails I use lb_is_started()
> and lb_next() to select the next destination.
>
> With the high call rate I'm concerned that the load values acquired 1
> second ago will be used for the entirety of the following second which
> would likely lead to a highly imbalanced load. If 1000 calls arrive in
> that second I need them spread evenly over the freeswitch servers
> which can only happen if OpenSIPs is counting each call as its
> allocated.
>
> My hope is that the module increments its counters each time a call is
> allocated to a destination; however I have been unable to isolate the
> line of code which performs this operation so I'm reaching out for
> confirmation. I can see the module adding the dialogs to profiles and
> that a separate lb_count_call() method is provided for counting calls
> but I'm unclear on the exact usage although it certainly encourages me
> that this counting is taking place somewhere.
>
> Thanks for reading,
>
> Callum
>
More information about the Users
mailing list