Hi Callum,

Just to be 100% sure I got this right - the exact issue you report here is also (in a more detailed way) reported in 3297 HG ticket, right ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 02.02.2024 16:53, Callum Guy wrote:
Hi Bogdan,

Thanks for taking a look.

I'm still working on this and was in the process of writing a second
issue to discuss my findings from looking at the module. In essence we
can see the profiles potentially being counted multiple times - both
in the max_load calculation (lb_update_max_loads) and then again in
the balancing code itself (get_dst_load).

You are correct that I have multiple OpenSIPs in front of these
freeswitch instances. I operate separate registrars and SBCs and these
do not replicate data to each other. The main complication arises as I
am gradually releasing this onto a busy system - callers are currently
allocated to a specific freeswitch server using manually controlled
logic and am aiming to use the load balancer to automatically
distribute the calls, allowing instances to be easily added and
removed without reallocating callers to devices. As the vast majority
are not initially enrolled in the load balancer the calls are not
being counted and therefore the test accounts all have zero calls in
the profile and the call is being distributed to any instance rather
than the instance which has the most available channels
proportionally.

I've just gone ahead and posted the issue
(https://github.com/OpenSIPS/opensips/issues/3297) as you've responded
- that might add confusion or clarity, I'm not sure yet!

I think I need to take some more time to review the module and propose
a solution that will work for my scenario but I'm happy to share more
details of the setup if you are interested in helping me to find a
solution that would work for both me and the community.

Many thanks,

Callum

On Fri, 2 Feb 2024 at 14:37, Bogdan-Andrei Iancu <[email protected]> wrote:
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



_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to