[SR-Users] Kamailio ​ds_ping_interval Performance

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 4 19:03:08 CEST 2018


Hello,

On 03.04.18 03:06, Atul Thosar wrote:
> Hi All,
> I am using Kamailio
> ​*​*
> *v4.4.x* to load balanced traffic to FreeSWITCH servers. I have query
> regarding ds_ping_interval and ds_probing_threshold. We have very high
> traffic (around 200-400
> ​ (CPS)​
> calls per sec) hitting on Kamailio which then distribute it to 2-3
> FreeSWITCH servers.
> ​ ​
> What is the optimal value should I set to ds_ping_interval and
> ds_probing_threshold?
>
> If I set  
> ​​
> ds_ping_interval=2 and
> ​​
> ds_probing_threshold=1 then in every 2 sec, I would come to know if my
> ​​
> FreeSWITCH server is down/up. But by setting such low values, I afraid
> there would
> ​be ​
> lot of SIP traffic on network.
> ​ If I set high (say
>> ds_probing_threshold=5) then I may loose high number of calls (200
> CPS, I will loose 1000 calls) in case 
>> FreeSWITCH server is down. ​
>
>
> As I said earlier we have very high traffic hitting on Kamailio, can't
> kamailio use INVITE itself to probe FreeSWITCH server is down/up? In
> case of low traffic can't it switch over to OPTION mechanism?
>
no matter how low you set the keepalive ping interval, it is still
recommended to do failure routing in case a call sent to a freeswitch is
not accepted the call.

Given the above, usually my approach is to have ds_ping_interval not
that low, but like 20 to 40 seconds, and do always re-routing if a call
is not accepted by a freeswitch in rather short time (say 2-4 seconds if
freeswitch is in the same network). In this case, no call is lost even a
freeswitch is down.

The keepalive is more for monitoring and seeing that a gateway is down
for long time and do not try it in such case -- you can use event_route
blocks from dispatcher to trigger some alerts if a gateway is down/up.

How to do re-routing in case of failure is shown by the kamailio.cfg
example from dispatcher documentation, with a failure_route block.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - April 16-18, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180404/b17fd091/attachment.html>


More information about the sr-users mailing list