Uh, I'm just a bystander looking at this, and it seems that the code and
explanation would be a lot simpler if the weights are just proportional.
Given n weights (w),
for i=1 to n: SUM w[i] = total weight
proportional: Pw[i] = w[i] / total weight
so, if you have two weights, 10 and 10, then Pw[1] = .5 and Pw[2] = .5
if they are 180 and 180, Pw[1] = .5 and Pw[2] = .5
Pw values vary from 0 to 1. They should always add up to 1. Multiply by
100 if you want.
No conditionals, no special cases (as long as no w[i] == 0, everything
should be OK). (or, as long as at least 1 w[i] != 0).
Right?
On Sat, Dec 13, 2014 at 12:02 AM, Olle E. Johansson <oej(a)edvina.net> wrote:
On 12 Dec 2014, at 10:49, Daniel-Constantin Mierla <miconda(a)gmail.com>
wrote:
On 11/12/14 16:29, Ovidiu Sas wrote:
> Also 'weight' attribute is not fully documented. There are missing
> examples and details about how it works.
> IIRC, the sum of all weights must be 100, otherwise strange things
happens.
Can you give some examples of such strange things, because otherwise it
is impossible to guess where to look for.
THe weight option is really not
documented well. Maybe we should start
with documenting how it works. The source code has no comments and no
explanations. It does some randomizing and other cool stuff to perform its
magic - but can we please get an explanation?
/O
Daniel
>
> On Thu, Dec 11, 2014 at 10:18 AM, Olle E. Johansson <oej(a)edvina.net>
wrote:
>> On 11 Dec 2014, at 16:15,
Daniel-Constantin Mierla <miconda(a)gmail.com>
wrote:
>>
>>> Hello,
>>>
>>> it is supposed to be the upper limit for call load distribution -- if
>>> number of active calls gets to it, no new call should be sent there.
If
>>> not implemented, then I forgot about
it.
>> I think there's a risc that your latest statement is true. If so, this
is a gentle
>> reminder ;-)
>>
>> /O
>>> Cheers,
>>> Daniel
>>>
>>> On 11/12/14 15:41, Olle E. Johansson wrote:
>>>> Hi!
>>>>
>>>> In the source code for dispatcher there is parsing of a predefined
attribute called "maxload".
>>>>
>>>> It's not documented and I don't see it used anywhere in the
source
code. Only in output of
>>>> attributes and debug code.
>>>>
>>>> Anyone that knows more? Can we remove this unused attribute or is it
planned for future glory?
>>
>> /O
>> _______________________________________________
>> sr-dev mailing list
>> sr-dev(a)lists.sip-router.org
>>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> --
> Daniel-Constantin Mierla
>
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev(a)lists.sip-router.org
>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
_______________________________________________
sr-dev mailing list
sr-dev(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
_______________________________________________
sr-dev mailing list
sr-dev(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
_______________________________________________
sr-dev mailing list
sr-dev(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
Steve Murphy
ParseTree Corporation
57 Lane 17
Cody, WY 82414
✉ murf at parsetree dot com
☎ 307-899-5535