[Kamailio-Users] Dispatcher hash algorithms.

samuel samu60 at gmail.com
Mon Sep 29 13:34:10 CEST 2008


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

> samuel wrote:
>
>> 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,...)
>>
>
> Yes, but is that not a relatively minor use case that applies to situations
> in which stateful transaction forwarding (TM module) is not used?
>
> Meaning, if I t_relay() an INVITE to a gateway selected by dispatcher,
> subsequent provisional responses and in-dialog requests will be passed
> between the original endpoints without further intervention.



Responses will traverse back the way and therefore will pass the t_relay()
host. Further in-dialog requests might traverse the t_relay host or not
(record-route stuff)...It depends on the network topology and the
application. There are lots of HA deployments and proxy with PSTN
termination that require this hash algorithm. In that cases you just want a
loadbalancer with low processing (no tm) or to be in the middle of the
dialog signal exchange (case of PSTN gateway).


>
> If it didn't work that way, round-robin and random wouldn't work as
> algorithms because the next message would be sent to another server.
>
> So, stateless forwarding aside (why would you want to do that in a
> dispatcher load balancing or failover scenario?), why do these hash
> algorithms make any sense to use?
>
> --
> Alex Balashov
> Evariste Systems
> Web    : http://www.evaristesys.com/
> Tel    : (+1) (678) 954-0670
> Direct : (+1) (678) 954-0671
> Mobile : (+1) (706) 338-8599
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20080929/f853f44d/attachment.htm 


More information about the Users mailing list