<div dir="ltr"><pre>"Is there a special reason why you are using "sql-only"? We've only carried it to 2.4 just to make the transition easier." - <br>No there were no special reasons for sticking to this, I guess it's completely okay to use this mixed "write-back" mode, and furthermore this looks much better in terms of throughput.<br><br>"But, in my opinion, single-instance-sql-write-through is net superior, since:" -<br>I guess you meant "<span id="gmail-m_-1357424334474846405gmail-LC92" lang="plaintext">single-instance-sql-write-back</span>"?
"* the WRITE operations (REGISTER processing) are just as slow as with sql-only, since both modes wait for the WRITE to finish before replying to the UAC,<br>thus guaranteeing the registration cannot be lost anymore" - <br></pre><pre>yeah I completely agree with you, sql-only mode is not that effective in terms of speed, so we are going to test write-back way of handling this.<br>Thanks for your attention!<br></pre></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 2, 2019 at 12:29 PM Liviu Chircu <<a href="mailto:liviu@opensips.org">liviu@opensips.org</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">
<div bgcolor="#FFFFFF">
<div>On 02.10.2019 12:12, Donat Zenichev
wrote:<br>
</div>
<blockquote type="cite">
<div><span id="gmail-m_-6267858787157707997gmail-LC86" lang="plaintext">modparam("usrloc",
"working_mode_preset", "sql-only")</span></div>
</blockquote>
<tt>Is there a special reason why you are using "sql-only"? We've
only carried it to 2.4<br>
just to make the transition easier. But, in my opin</tt><tt>ion,
"single-instance-sql-write-through"<br>
is net superior, since:<br>
<br>
</tt>
<p><tt>* the WRITE operations (REGISTER processing) are just as slow
as with "sql-only", since both<br>
modes wait for the WRITE to finish before replying to the UAC,
thus guaranteeing the registration<br>
cannot be lost anymore<br>
<br>
* the READ operations (INVITE processing) are much faster than
"sql-only", as the data is cached<br>
<br>
Aside from these design considerations, I see no issues with
creating that unique index. To help<br>
you a bit, the actual SELECT query only fetches the "username" +
"domain" columns. So I think your<br>
composite index covers that and optimizes the lookup.</tt></p>
<p><tt>Cheers,</tt></p>
<pre cols="72">Liviu Chircu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
<blockquote type="cite">
<div><span id="gmail-m_-6267858787157707997gmail-LC92" lang="plaintext">I
also have one last question, is it a bad practice to include
indexes (unique/constraint keys) into OpenSIPS table
structures?</span></div>
<div><span id="gmail-m_-6267858787157707997gmail-LC92" lang="plaintext">Such
as I did with a location table (of OpenSIPS 2.4 version):</span></div>
<div><span id="gmail-m_-6267858787157707997gmail-LC92" lang="plaintext">"UNIQUE
KEY `account_contact_idx`
(`username`,`domain`,`contact`,`callid`,`contact_id`)"</span></div>
<div><span id="gmail-m_-6267858787157707997gmail-LC92" lang="plaintext"><br>
</span></div>
<div><span id="gmail-m_-6267858787157707997gmail-LC92" lang="plaintext">Would
this have any superfluous impact on the system?</span></div>
</blockquote>
</div>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.opensips.org" target="_blank">Devel@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><font style="background-color:rgb(255,255,255)" color="#0b5394">Best regards,<br></font></div><div dir="ltr"><font style="background-color:rgb(255,255,255)" color="#0b5394">Donat Zenichev<br><br></font></div></div></div></div></div></div></div></div>