[OpenSIPS-Users] OpenSips Load balancer. - Overcome limitations of Call Driven Load Balancing

Chandan PR chandan.pr at webshar.org
Mon Jul 27 12:33:15 EST 2020


Hi Jon, and All

While I was thinking through this approach, one question popped up in my
thought.

Since we run on a full load most of the hours, even if we limit the number
of calls to the faulty destination, it is very much possible that call
drain can happen as the faulty destination errors out immediately.

The only option to make sure the faulty destination doesn't get any calls
is by disabling it right..

Let me know what you think.


On Fri, Jul 24, 2020 at 7:42 PM Jon Abrams <ffshoh at gmail.com> wrote:

> Hi Chandan,
>
> There may be something else purpose built for this, but you can use
> the dialog profiles to track and limit the port usage:
>
>     set_dlg_profile("outcarrier","$avp(out_carrier_id)");
>
>     if ($avp(out_max_call_limit) > 0)
>     {
>         set_dlg_profile("profile","$avp(out_qos_profile_id)");
>         if
> (get_profile_size("profile","$avp(out_qos_profile_id)","$var(out_gw_count)"))
>         {
>             if ($var(out_gw_count)>$avp(out_max_call_limit))
>             {
>                 xlog("LIMIT: Call $ci - Max call limit hit by
> $avp(src_addr) on QosProfile $avp(out_qos_profile_id) to gw
> $avp(out_gw_id)\n");
>                 return(-1);
>             }
>         }
>     }
>
> On Fri, Jul 24, 2020 at 8:55 AM Chandan PR <chandan.pr at webshar.org> wrote:
> >
> > Hello Everyone,
> >
> > Currently, we are using Open Sips Load balancer in Call Driven load
> balancing.
> >
> > Our scenario is as below:
> >
> > D - Total Destinations configured at OpenSips
> > P - No of Ports/Sessions Each Destination can handle concurrently
> > C - Total Capacity = D*P
> >
> > We have a Call Loader which loads calls to OpenSips at C and as when the
> result comes further calls get loaded.
> > For some reason, if any destination is not in the right state and sends
> error responses without accepting calls, this introduces a drain scenario.
> > In the drain scenario where all new calls are given to the faulty
> destination as it has more availability.
> >
> > We are currently handling this by
> >
> > Running the loader at 80% of C
> > Disabling the destination in Opensips if 75% of the calls fail for the
> particular destination (Attached loadbalancer.cfg file).
> >
> >
> > But even in this case, it is possible that may call error out as the
> destination is free and calls are loaded.
> >
> > We would like to avoid this scenario to the max possible extent by
> limiting the number of calls we send to this particular destination.
> >
> > Couple of options I see are as below:
> >
> > Wait for a brief period before sending the response to loader when the
> error happens
> > Make OpenSips aware of the destination capacity and adjust ports
> accordingly
> >
> > Write a custom script to poll destination capacity and use MI functions
> to adjust accordingly
> > Or is there any possibility to integrate similar to FreeSwitch driven
> routing
> >
> > Are there any other possibilities of adjusting the OpenSips capacity
> dynamically or make it limit the calls sent to the particular destination?
> >
> > --
> >
> > Regards,
> > Chandan Ravishankar
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


-- 

Regards,
Chandan Ravishankar <https://about.me/chandanpr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200727/37f657ca/attachment-0001.html>


More information about the Users mailing list