Module: sip-router
Branch: master
Commit: 651603023f4fc46b25bc143d44415cd0acdf0a48
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6516030…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Feb 11 15:20:36 2010 +0100
dispatcher(k): weight based distribution
- new algorithm 9 for weight based distribution
- new column to hold attributes per destination
- for weight based distribution you have to set for each address in
destination set: weight=value, for example:
[setid address flags priority attributes]
2 sip:10.10.0.1:5080 0 2 weight=40
2 sip:10.10.0.2:5082 0 1 weight=60
- this will send 60% of the traffic to second address
- note that at startup the distribution is randomized, so traffic is
directed to first or second desintation alternatively but keeping
overall percentages
---
modules_k/dispatcher/dispatch.c | 248 ++++++++++++++++++++++++++++---------
modules_k/dispatcher/dispatch.h | 2 +
modules_k/dispatcher/dispatcher.c | 13 ++-
3 files changed, 203 insertions(+), 60 deletions(-)
Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=651…