Hello,
On 12/15/11 12:06 PM, Mino Haluz wrote:
Hi,
I would like to use the dispatcher module with algorithm 10 - call
load balancing. But there are multiple things that are a bit unclear
to me. I have multiple gateways that can serve different maximum
number of calls.
1) Can I somehow set the maximum calls count for each dispatcher
gateway, so that it can fairly distribute the calls? I know it is
stateless module, but how could I solve this?
it is not stateless module -
dispatcher has nothing to do with the
states, it just selects the destinations. Then, if you relay with tm you
make the routing transaction stateful and if you forward() then it is
stateless routing.
The algorithm does selection of the least loaded destination. There is
another algorithm for weight based distribution (iirc 9), might suit
better your need.
2) Is there any method how can I get the current
number of calls for
each gateway from the dispatcher module?
Not yet.
3) What is the expiration timer in the dispatcher
module for dialogs
if the dialog is canceled uncleanly ?
http://kamailio.org/docs/modules/stable/modules_k/dispatcher.html#id2498263
4) Imagine I will restart kamailio, it will lose the
call count and
the distribution will be incorrect. Maybe it could nice, that kamailio
would offer MI command to set these values.
Some enhancements can be done, of
course, it is a matter of time and
interest for developers, the fastest way to get something is to
contribute, it is open source greatest benefit.
Personally I haven;t invested much in enhancing this algorithm lately
because it does not bring relevant benefits comparing with round robin.
The actual load on a server is not a matter only of the number of active
calls, but also the content of the media stream and its processing
(e.g., 10 calls on hold consume less resources than 3 active and verbose
conversations). The most of the calls are in the average duration of a
business type, thus simple round-robin is keeping pretty fair load
balancing of the active calls -- from experience, with round-robin none
of the destinations got more than 10% load than the average.
Regarding the restart, yes, there can be coding to make it more
accurate, but if it is call load balancing, practically a restart cannot
get a destination to have more than 1 call than it should have, which I
think it is not something critical.
But again, any contributions in this regard will be considered and
accepted when they bring benefits.
Cheers,
Daniel
--
Daniel-Constantin Mierla --
http://www.asipto.com
http://linkedin.com/in/miconda --
http://twitter.com/miconda