[Kamailio-Users] Load Based Load Balancing

Ovidiu Sas osas at voipembedded.com
Thu May 21 15:58:17 CEST 2009


Please keep the list in your replies.
Check the dialog documentation carefully.  It is all explained there:
how to add dialogs into a profile and retrieve the them.
The dialog profiles are stored into memory for fast access.

Regards,
Ovidiu Sas

On Wed, May 20, 2009 at 4:26 PM, Kareem Hamdy
<Kareem.Hamdy at trustvesta.com> wrote:
> Thanks!
>
> I still don't know how to do it, but you've put me on the right track.  I'm fairly new to Kamailio, so I'm trying to figure out all the syntaxing.  I did an SQL query on my FS boxes, and I was able to see the number of dialogs per host.
>
> Is it possible to do something similar with Kamailio - where I store the dialogs in a DB and query it in the dispatcher section of my routes?
>
> If so, would you be able to give me an example syntax of how I'd go about doing so?
>
> Thanks,
> Kareem
>
>
>
>
>
> -----Original Message-----
> From: sip.nslu at gmail.com [mailto:sip.nslu at gmail.com] On Behalf Of Ovidiu Sas
> Sent: Wednesday, May 20, 2009 12:10 PM
> To: Kareem Hamdy
> Cc: users at lists.kamailio.org
> Subject: Re: [Kamailio-Users] Load Based Load Balancing
>
> Hello Kareem,
>
> Use dialog profiling to track the number of calls per destination:
> http://www.kamailio.net/docs/modules/1.5.x/dialog#id2531102
> In your script, before sending the INVITE out, check if the selected
> destination has enough capacity to accept the call:
> http://www.kamailio.net/docs/modules/1.5.x/dialog#id2532103
>
>
> Regards,
> Ovidiu Sas
>
> On Wed, May 20, 2009 at 2:57 PM, Kareem Hamdy
> <Kareem.Hamdy at trustvesta.com> wrote:
>> Hello:
>>
>> I've been going through your lists and your documentation, and I'm unable to find how you set up load based load balancing.
>>
>> To further illustrate:
>>
>>
>>
>> For example, let's say we have the following live calls:1,2,3,4,5,6,7
>>
>> Round Robin Works Well
>> ----------------------
>>
>> +-----+
>> | SER |
>> +-----+
>>   |
>>   |       +--------------+
>>   |-------| FreeSWITCH 1 |  [Calls 1,3,5,7]
>>   |       +--------------+
>>   |
>>   |       +--------------+
>>   |-------| FreeSWITCH 2 |  [Calls 2,4,6]
>>           +--------------+
>>
>>
>>
>> But let's say some of the calls end significantly quicker than the others, how can I send calls by their load (current calls, cpu, etc)
>>
>> For example, let's say we have the following live calls:1,2,3,4,5,6,7 - Let's say calls 4 and 5 lasted about 30 seconds, while the others lasted about 5 minutes.  How would I be able to route calls to the box that's least used - in this example, "FreeSWITCH 2" at any given time had the least number of calls, so calls 4,5, and 6 were dispatched to it.
>>
>> Load Based Load Balancing
>> -------------------------
>>
>> +-----+
>> | SER |
>> +-----+
>>   |
>>   |       +--------------+
>>   |-------| FreeSWITCH 1 |  [Calls 1,3,7]
>>   |       +--------------+
>>   |
>>   |       +--------------+
>>   |-------| FreeSWITCH 2 |  [Calls 2,6]
>>           +--------------+
>>
>>
>>
>> Thanks,
>> Kareem
>>
>>
>>
>> _______________________________________________
>> Kamailio (OpenSER) - Users mailing list
>> Users at lists.kamailio.org
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>




More information about the sr-users mailing list