[OpenSIPS-Users] location table in MySQL when using full-sharing-cluster

Liviu Chircu liviu at opensips.org
Thu Jul 5 10:43:20 EDT 2018


Please don't set the "db_mode" [1] - it acts as a "working_mode_preset", 
overriding any other settings and putting your box into 
"single-instance-write-back".  Maybe I should emphasize this behavior 
even further both in the docs and logs.

Best regards,

[1]: 
http://www.opensips.org/html/docs/modules/2.4.x/usrloc.html#param_db_mode

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 05.07.2018 16:31, Schneur Rosenberg wrote:
> Liviu, can you help me out, I was playing around with the settings, by
> doing a ngrep  I see the binary stuff going between servers, but the
> second server does not actually load the registrations in memory.
>
> When I do a restart on the second server it loads from DB into memory,
> but as soon as it expires it disappears, even though it received from
> the binary re-registrations from the cluster.
>
> Here is what I have set now.
> modparam("usrloc", "location_cluster", 1)
> modparam("usrloc", "skip_replicated_db_ops", 1)
> modparam("usrloc", "cluster_mode", "full-sharing")
> modparam("usrloc", "location_cluster", 1)
> modparam("usrloc", "restart_persistency", "load-from-sql")
> #modparam("usrloc", "restart_persistency", "sync-from-cluster")
> modparam("usrloc", "sql_write_mode", "write-back")
> modparam("usrloc", "db_mode", 2) #is this the same as the previous line?
>
> On Thu, Jul 5, 2018 at 11:47 AM, Schneur Rosenberg
> <rosenberg11219 at gmail.com> wrote:
>> Thanks liviu, the failover was just something nice to have, I can live
>> without it, thanks again.
>>
>>
>> On Thu, Jul 5, 2018, 11:32 AM Liviu Chircu <liviu at opensips.org> wrote:
>>> Sorry, I didn't fully read your request.  The "restart_persistency"
>>> parameter is a selector: either A) or B). What you want is something
>>> like: "perform A). if it fails, fall back to B)".  And this is, indeed,
>>> not possible as of now.
>>>
>>> Liviu Chircu
>>> OpenSIPS Developer
>>> http://www.opensips-solutions.com
>>>
>>> On 05.07.2018 10:30, Liviu Chircu wrote:
>>>> Hi Schneur,
>>>>
>>>> Yes, this is possible.  Unset the "working_mode_preset" and
>>>> individually set the "cluster_mode", "restart_persistency" and
>>>> "sql_write_mode" so you achieve this effect.
>>>>
>>>> Best regards,
>>>>
>>>> Liviu Chircu
>>>> OpenSIPS Developer
>>>> http://www.opensips-solutions.com
>>>>
>>>> On 05.07.2018 09:43, Schneur Rosenberg wrote:
>>>>> Hi I have the working_mode_preset parameter in the usrloc module set
>>>>> to full-sharing-cluster, is there anyway to have the location table
>>>>> written to the MySQL database too? I need  to pull information from
>>>>> the database.
>>>>>
>>>>> Basically the database should be for informational purposes, the
>>>>> restart_persistency should still be sync-from-cluster and the
>>>>> sql_write_mode should be write-back.
>>>>>
>>>>> A nice option would be if It can also be used as a backup for
>>>>> restart_persistency if the entire cluster crashes at once.
>>>>>
>>>>> I assume I can get this done with NoSQL but that would mean that I
>>>>> need to rewrite a lot of stuff that was written for MySQL
>>>>>
>>>>> S. Rosenberg
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list