[Kamailio-Devel] Dispatcher hash algorithms.

Alex Balashov abalashov at evaristesys.com
Mon Sep 29 12:38:30 CEST 2008


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



More information about the Devel mailing list