<div dir="ltr">Hello,<div><br></div><div>usrloc has already "server_id_filter" for filtering by server id deletions and loading of db records. And also ka_* has a filter for that, so why not add a filter also for saving records?</div><div><br></div><div>This will enable to:</div><div>- share a db between servers, everyone managing own records</div><div>- be compatible with dmq for usrloc replication, you may have replicated contacts and db persistence at same time.</div><div><br></div><div>what do you think?</div><div><br></div><div>br,</div><div>matteo</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 27, 2022 at 11:39 AM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
if each node is having its own independent database, it should work<br>
fine. If the database is replicated or a cluster, then conflicts of<br>
duplicated rows can occur, there is the option to do update if insert<br>
failed, but probably is better that only one node writes to db if the db<br>
does replication by itself.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 27.09.22 01:04, Alex Balashov wrote:<br>
> Yeah, it worked great in ‘lab’ for me too. It’s in production that there are some struggles… :-) <br>
><br>
>> On Sep 26, 2022, at 2:17 PM, Arsen Semenov <<a href="mailto:arsperger@gmail.com" target="_blank">arsperger@gmail.com</a>> wrote:<br>
>><br>
>> by the chance I was playing exactly with the same setup these days, in a lab everything works just fine. +1 to the initial question. <br>
>><br>
>> On Mon 26 Sep 2022 at 18:33, Joel Serrano <<a href="mailto:joel@textplus.com" target="_blank">joel@textplus.com</a>> wrote:<br>
>> +1 in this situation haha, also hoping to get some nice input :D<br>
>><br>
>> On Mon, Sep 26, 2022 at 9:20 AM Matteo Brancaleoni <<a href="mailto:mbrancaleoni@gmail.com" target="_blank">mbrancaleoni@gmail.com</a>> wrote:<br>
>> Well,<br>
>><br>
>> I asked a similar question here <a href="https://lists.kamailio.org/pipermail/sr-users/2022-July/115160.html" rel="noreferrer" target="_blank">https://lists.kamailio.org/pipermail/sr-users/2022-July/115160.html</a> but no answer yet :) <br>
>><br>
>> What I see on my side is that it indeed works, the only drawback is that the same contact is getting synced to DB, which causes a duplicate error unless you use the "db_insert_update" option.<br>
>><br>
>> Done that seems that it works ok (did tested in prod yet), and I had the all the contacts live on all nodes and on db. The only downside that maybe can happen is that the periodic sync may skew a bit the expire time and maybe give a contact some more seconds, but it really depends on timings of the clusters.<br>
>><br>
>> But I'm really interested in the answer, too :) <br>
>><br>
>> -- Matteo<br>
>><br>
>><br>
>> On Mon, Sep 26, 2022 at 4:07 PM Alex Balashov <<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>> wrote:<br>
>> Hi,<br>
>><br>
>> Are there any known contraindications for replicating contacts using dmq/dmq_usrloc, and injecting those contacts into a database on one of the nodes using usrloc with `db_mode` 1 or 2?<br>
>><br>
>> Predictably, this is being done to support the use-case of getting registration status from database. If you think this should be done with JSONRPC, I am in complete agreement with you, but it’s not up to me. :-)<br>
>><br>
>> I am doing this with `db_mode` 2 now, and finding that, for a small number of AORs, one can find instances where they are consistently stored in memory but not present in the `location` table. The overall proportion of these AORs, out of thousands, seems to be quite small. It was initially somewhat higher, and it went down once I increased usrloc `timer_processes` and increased the sync interval from 30 to 60 seconds. <br>
>><br>
>> Nevertheless, it is still non-zero, and I am getting intermittent reports. I wonder if there are some prior experiences with this and anything to watch out, or if `db_mode` 1 might be a superior choice. I personally cannot see how that would be; it seems to have all the performance downsides of mode 3. But perhaps if something about it is more “problem-free” vis-a-vis DMQ, it’s worth a shot?<br>
>><br>
>> — Alex<br>
>><br>
>> -- <br>
>> Alex Balashov | Principal | Evariste Systems LLC<br>
>><br>
>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)<br>
>> Web: <a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a><br>
>><br>
>><br>
>> __________________________________________________________<br>
>> Kamailio - Users Mailing List - Non Commercial Discussions<br>
>>   * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>> Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
>> Edit mailing list options or unsubscribe:<br>
>>   * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>> __________________________________________________________<br>
>> Kamailio - Users Mailing List - Non Commercial Discussions<br>
>>   * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>> Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
>> Edit mailing list options or unsubscribe:<br>
>>   * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>> __________________________________________________________<br>
>> Kamailio - Users Mailing List - Non Commercial Discussions<br>
>>   * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>> Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
>> Edit mailing list options or unsubscribe:<br>
>>   * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>> -- <br>
>> Sent from Gmail Mobile<br>
>> __________________________________________________________<br>
>> Kamailio - Users Mailing List - Non Commercial Discussions<br>
>>  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>> Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
>> Edit mailing list options or unsubscribe:<br>
>>  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
> -- <br>
> Alex Balashov | Principal | Evariste Systems LLC<br>
><br>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)<br>
> Web: <a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a><br>
><br>
><br>
> __________________________________________________________<br>
> Kamailio - Users Mailing List - Non Commercial Discussions<br>
>   * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
> Edit mailing list options or unsubscribe:<br>
>   * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
-- <br>
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" rel="noreferrer" target="_blank">www.asipto.com</a><br>
<a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - Online<br>
  Nov 7-10, 2022 (Europe Timezone)<br>
  * <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" rel="noreferrer" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a><br>
<br>
<br>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>