<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><tt>Hi Sasmita,</tt></p>
<p><tt>As I have written with bold font in the docs of each cluster
parameter:</tt><br>
<br>
<tt><strong style="color: rgb(0, 0, 0); font-family: Helvetica,
Arial; font-size: 12px; font-style: normal;
font-variant-ligatures: normal; font-variant-caps: normal;
letter-spacing: normal; orphans: 2; text-align: justify;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); text-decoration-style:
initial; text-decoration-color: initial;">This parameter will
get overridden if either<span> </span><a class="xref"
href="https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_working_mode_preset"
title="1.5.26. working_mode_preset (string)" style="color:
rgb(4, 31, 197); text-decoration: none;">working_mode_preset</a><span> </span>or<span> </span><a
class="xref"
href="https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_db_mode"
title="1.5.25. db_mode (integer, deprecated)" style="color:
rgb(4, 31, 197); text-decoration: none;">db_mode</a><span> </span>is
set.</strong></tt><br>
<br>
<tt><tt>If you want some low-level configuration for your usrloc
cluster (and not the defaults),<br>
do not set the "working_mode_preset". It's job is to make it
easy to get everything<br>
working.</tt></tt></p>
<p><tt><tt>Regarding 2): the default of "full-sharing-cluster" is to
sync from cluster. That's why<br>
you get no data in MySQL. Just remove "working_mode_preset",
and change the persistency<br>
to "sync-from-sql", so it starts writing the data over there.</tt></tt></p>
<p><tt><tt>An architecture comment regarding 2): you are doing full
sharing (any node should be able<br>
to take over any contact), so make sure your network topology
supports this. A<br>
front-end SIP entity that's balancing traffic to this cluster
+ SIP path headers is needed<br>
here before it can logically work, otherwise you'll run into
NAT issues (only the home server<br>
will be able to route back to the phone, rather than any node
which has the data)</tt></tt></p>
<p><tt><tt>Regarding 3): same architectural issue as in 2). You are
attempting to builkd a homogeneous cluster,<br>
yet this is not true, because of all sort of NAT limitations,
restraining traffic to be only<br>
sent from a certain node at a time.</tt></tt></p>
<p><tt><tt>Conclusion: we didn't make these multiple modes just for
fun, each of them serves its purpose :)<br>
And I agree that for your current needs, it seems like the
"federated" clustering is the way to go.<br>
</tt></tt></p>
<p><tt><tt>Best regards,<br>
</tt></tt></p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 25.07.2019 13:05, Sasmita Panda
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALf-Q453CTjGGVoCU+DdC4NW7DV=FKAEKxFjd_Thv+Xe4P1eFA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">I need some clarification on cluster_mode and
working_mode_preset parameter .
<div><br>
</div>
<div>modparam("usrloc", "location_cluster", 1)<br>
modparam("usrloc", "working_mode_preset",
"federation-cachedb-cluster")<br>
modparam("usrloc", "cluster_mode", "federation-cachedb")<br>
modparam("usrloc", "restart_persistency", "sync-from-cluster")<br>
<b>1. metadata in mongoDB and exact AOR in opensips memory
through which user is registered . call work fine even
when both registered through different node .</b><br>
<br>
modparam("usrloc", "working_mode_preset",
"full-sharing-cluster")<br>
modparam("usrloc", "cluster_mode", "full-sharing")<br>
modparam("usrloc", "restart_persistency", "sync-from-cluster")<br>
<b>2. no metadata in mongoDB . AOR of user in opensips memory
oly and synced with each node . So call wont work when 2
user register through different node . </b><br>
<br>
modparam("usrloc", "working_mode_preset",
"full-sharing-cachedb-cluster")<br>
modparam("usrloc", "cluster_mode", "full-sharing-cachedb")<br>
<b>3. exact AOR in mongoDB . nothing exist in the opensips
memory . This even wont work when both user registered
through different node . </b><br>
<br>
I was assuming things will work fine in every condition . but
its not working . Am I missing anything in the config so that
its not working for me in 2nd and 3rd scenario ?<br>
<br>
In any of above case the data is not getting saved in the
mysql DB . I think it wont even get saved in mysql DB . when
we use working_mode_preset we cant use db_mode . <br>
<br>
I think the 1st option is only preferable . Is the 2nd and
3rd option has this limitations ? Or I have to add something
in the config as well to make this work ?<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr"><b><i>Thanks & Regards</i></b>
<div><i>Sasmita Panda</i></div>
<div><i>Senior Network Testing and Software Engineer</i></div>
<div><i>3CLogic , ph:07827611765</i></div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jul 24, 2019 at 6:32
PM Liviu Chircu <<a href="mailto:liviu@opensips.org"
moz-do-not-send="true">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"> On 24.07.2019 15:33, Sasmita Panda
wrote:<br>
<blockquote type="cite">
<div>Questions :</div>
<div>1. In user location of mongo db , it saves the data
of the user with the node IP . Its not the actual AOR of
the user . Where does the actual AOR get saved ? Is that
saved in the memory of opensips node only?<br>
</div>
</blockquote>
<tt>Correct: the MongoDB only holds metadata, showing where
the user is reachable from to all nodes. The actual AoR
is saved<br>
in OpenSIPS memory, which is then sync'ed to the local
MySQL "location" table, for restart persistency purposes.
See<br>
the restart_persistency [1] modparam for more details.<br>
</tt><br>
<blockquote type="cite">
<div> 2. As the cluster info is in the mysql DB , If 1
node will get down , then I have to update the DB
immediately and restart the service ? OR that node will
be disabled automatically no need of service restart ? <br>
</div>
</blockquote>
<tt>No need to edit anything. The cluster detects when a
node is down and acts accordingly.</tt><tt> <br>
The cluster nodes will keep sending "probing" pings, to
detect when it comes back online.</tt><tt><br>
</tt>
<p><tt>Regards,</tt><br>
</p>
<tt>[1]: </tt><tt><a
href="https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_restart_persistency"
target="_blank" moz-do-not-send="true">https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_restart_persistency<br>
<br>
</a></tt>
<pre class="gmail-m_3485052808611004700moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="gmail-m_3485052808611004700moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a></pre>
<a
href="https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_restart_persistency"
target="_blank" moz-do-not-send="true"><br>
</a> </div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank"
moz-do-not-send="true">Users@lists.opensips.org</a><br>
<a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>