On 13/02/15 01:32 PM, Marc Soda wrote:
How does Kamailio load balance traffic to rtpengine?
Is it load based,
round robin, etc? The module makes mention of this but I don't see how
it works. Also, it talks about weighting the proxies. How is that
accomplished?
This part of the module is virtually unmodified from the rtpproxy module
and I see that the documentation is lacking in this regard, so I'll go
by what the code tells me.
Load balancing is achieved by running a hash over the call-id and using
the hash value to determine which RTP proxy from the selected set to
use. The hash ensures that everything related to the same call ends up
on the same RTP proxy, which is a requirement for proper operation.
If weighting is used, then RTP proxies with a higher weight will
accordingly get a larger fraction of the calls. If two RTP proxies are
defined, the first with a weight of 1 (which is the default) and the
second with the weight of 2, then the second will get twice as many
calls as the first one.
Syntax for the config is like this:
modparam("rtpengine", "rtpengine_sock",
"udp:localhost:2223 udp:localhost:2224=2")
Cheers