[OpenSIPS-Users] Loadbalancer for Registrations and calls

Giovanni Maruzzelli gmaruzz at gmail.com
Mon Oct 31 12:59:50 UTC 2022


On Mon, Oct 31, 2022 at 1:49 PM Giovanni Maruzzelli <gmaruzz at gmail.com>
wrote:

> On Sun, Oct 30, 2022 at 6:19 AM Kevin Kennedy <kennedy4260 at gmail.com>
> wrote:
>
>> I have set the ds_select_dst used in the mid_registrar part of the script
>> to hash the To URI
>>
>> $ru = (ds_select_dst(1, *2*, , "default", 1));
>>
>> You cannot use ds_select to send INVITE to where the REGISTER was
>

You can use the hashing Bogdan proposed, so ds_select will go to the same
machine because it gets the same result from hashing the same input. In
this case, you must find "something" (eg a cleaned TO for register and a
cleaned FROM for INVITE) that is exactly the same in REGISTER and INVITE to
use as base for the hashing. The hashing (like an MD5) will then be used to
send the method to the same machine (because the "md5" of the hash "base"
is the same (and will be the same only if the base is the same), it will go
to the same machine.


> You can make the kv-store visible to MI, and then ul_dump the AOR complete
> of kv-store
>
> Also, you can simply write in a memory hash or in a db table to which
> destination was the REGISTER going
>
> btw, I believe this architecture is fragile, you don't want INVITEs going
> to a destination related to the one REGISTER was, a lot of bad things can
> happen if you have such constraints.
> If you really really really want that, then just go for sharding based on
> domains or on users ranges, with some fallback schema
>
> -giovanni
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20221031/464b5726/attachment.html>


More information about the Users mailing list