From db55715003cd9af5ef3d32b51b5246643eea10d1 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Thu, 10 Dec 2020 16:25:49 +0100 Subject: [PATCH] dispacher: docs - more details about weight and rweight attributes - cross reference sections that have info about weight and rweight attributes --- .../dispatcher/doc/dispatcher_admin.xml | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml index 953c6b0b57d..53eea613ce7 100644 --- a/src/modules/dispatcher/doc/dispatcher_admin.xml +++ b/src/modules/dispatcher/doc/dispatcher_admin.xml @@ -1193,7 +1193,7 @@ modparam("dispatcher", "reload_delta", 1) 9 - use weight based load distribution. You have to set the attribute 'weight' for each address (gateway) in - destination set. For more see the description of the 'weight' + destination set. See also the description of the 'weight' attribute in the 'Special Attributes' section. @@ -1232,12 +1232,15 @@ modparam("dispatcher", "reload_delta", 1) The major difference from the weight distribution is the probability recalculation according to rweight value in case of - host enabling/disabling + destinations being active or inactive. - For example, 100 calls in 3-hosts group with rweight params 1/2/1 - will be distributed as 25/50/25. After third host failing - distribution will be changed to 33/67/0. + For example, 100 calls in 3-destinations group with rweight params 1/2/1 + will be distributed as 25/50/25. If the third destination becomes + inactive, the distribution is changed to 33/67/0. If the computation + of percentage per destination is not an exact integer number, the value + is trucated and the last destination is used to fill the remaining + percentage till 100. Using this algorithm, you can also enable congestion control by setting the @@ -1252,6 +1255,10 @@ modparam("dispatcher", "reload_delta", 1) If all the gateways in a set are above their congestion threshold(weight), the load distribution is instead done using the ratio of estimated congestion ms. + + See also the description of the 'rweight' attribute in the + 'Special Attributes' section. + @@ -2141,13 +2148,19 @@ kamctl rpc dispatcher.hash 4 bob server.com 'weight' - used for weight based load distribution. It must be set to a positive integer value beteen 0 and 100. The value represents - the percent of calls to be sent to that gateways.> + the percent of calls to be sent to that gateways. The sum must not + exceed 100, otherwise the destinations whose weight added to the + sum go over 100 are ignored. If the sum is less than 100, then the + last destination is used to fill the missing percentage. See also + the description of the corresponding algorithm parameter for + ds_select_dst(). 'rweight' - used for relative weight based load distribution. It must be set to a positive integer value between 1 and 100 (otherwise host will be excluded from relative weight distribution - type). + type). See also the description of the corresponding algorithm + parameter for ds_select_dst(). 'socket' - used to set the sending socket for the gateway. It is