[Kamailio-Devel] [Kamailio-Users] Dispatcher hash algorithms.

samuel samu60 at gmail.com
Mon Sep 29 13:05:56 CEST 2008


The Call-ID hash is used to send all requests of the same dialog to the same
endpoint (proxy,application server,gateway,whatever...).  The reason after
this behaviour is not to have these SIP endpoints sharing the status of all
the dialogs (not many applications out there share this status and therefore
you are required to send all within-dialog messages to the same SIP
instance).

simple: to send the BYE to the same gateway you sent the INVITE...

This does not guarantee fare load distribution....that's why depending on
what you are dispatching you can hash on several headers (if you don't have
to keep dialog state,...)

hope it helps,
Sam

2008/9/29 Alex Balashov <abalashov at evaristesys.com>

> I am curious, what exactly is the purpose and philosophy of the various
> hash algorithms in the dispatcher module?  I am referring to the ones
> that allow the gateway in the route set to be determined through a hash
> of various SIP headers, such as the From URI, the To URI, the Call-ID
> GUID, etc.
>
> No guarantee of fair distribution - or in fact, any distribution that
> can be characterised by any describable pattern whatsoever - is implied
> by these algorithms.
>
> Additionally, it seems that without knowing
>
> (1) The exact hash algorithm in use;
>
> (2) The distribution that this hash algorithm would yield for a given
> set of possible values of these header fields, which in many cases are
> specifically intended to be pseudorandom (e.g. Call-ID),
>
> there is absolutely no way to determine, from any meaningfully
> deterministic perspective, which numerical entry in the route set these
> algorithms would computationally yield.
>
> So, I guess my question is:  With no implied uniformity or weighting in
> the distribution whatsoever based on the incidental character of such
> values, what practical use does it serve to use any algorithms except
> round-robin or random?  Is it expected that the user will plot the hash
> values against a log of given input strings to determine how the
> distribution will shape up?  Is there some reason why the sort of
> profoundly lopsided distribution that may create might be desirable?
>
> Thanks,
>
> --
> Alex Balashov
> Evariste Systems
> Web    : http://www.evaristesys.com/
> Tel    : (+1) (678) 954-0670
> Direct : (+1) (678) 954-0671
> Mobile : (+1) (706) 338-8599
>
> _______________________________________________
> Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/devel/attachments/20080929/fc1a21ef/attachment.htm 


More information about the Devel mailing list