[OpenSIPS-Users] Opensips Dispatcher and PVAR pattern for load-balancing.
razvan at opensips.org
Wed Dec 23 14:54:01 CET 2015
A use case for this algorithm is setting the pv_algo_pattern as shown in
the documentation page:
modparam("dispatcher", "pvar_algo_pattern", "$stat(load_%u)")
This parameter indicates that whenever you are using a ds_select_*()
function with algorithm 9, OpenSIPS will check the load for each
destination, and order them based on each value.
For example, consider we have two destinations: sip:22.214.171.124 and
sip:126.96.36.199. Algorithm 9 will evaluate for each destination the
$stat(load_sip:188.8.131.52) and $stat(load_sip:184.108.40.206) and order them based
on its values. Then of course, first picks the least used one.
All that's left for you is to update the statistic accordingly. For example:
if (ds_select_dst("0", "9"))
Hope that's clear now.
On 12/18/2015 01:05 PM, DHAVAL INDRODIYA wrote:
> Dear All,
> I am working on opensips dispatcher and found that dispatcher is able
> to do loadbalancing in function ds_select_dst.
> I have found a good description on DISPATCHER module itself it says -
> " *The /pvar_algo_pattern/ parameter is used to determine the load on
> each server. If the parameter is not specified, then the first entry
> in the set is chosen.*"
> Now the question here is how to use this load balancing and what
> should be exact value we need to put in pvar_algo_pattern?
> How to define weight in table I mean what should be value of weight in
> table it is like number of call handling capability?
> I have found some of the reference and that some how not working i
> might be using in wrong way if any one have a good example then would
> be a great help for me.
> Users mailing list
> Users at lists.opensips.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users