<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi,<br>
<br>
It is up to you, at cfg level, to decide which tag to use for a
new dialog. And the status of the tag is irrelevant there (from
the assignment perspective).<br>
<br>
And the status of the tags must be managed by you, from outside
OpenSIPS - opensips itself will do nothing from this perspective
(of switching the status of the tags) - the only thing it does
with the tags is to be sure a tag is active on a single node.<br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 6/12/23 1:37 PM, Denys Pozniak
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+x3Axo31-vVqp3noJg3KPPnvPiUkcKmRs7x04eZtvB-RN7A6g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hello!
<div>Thank you for your help!</div>
<div><br>
</div>
<div>><span style="font-family:monospace">2) you can use the
same sharing tag for multiple modules, as time as from
logical perspective, the switching of the tags fits all the
cases. For dialogs, you may need one tag per node (to
remember which node created the dialog), so you may not be
able to reuse here.</span></div>
<div>Do I understand correctly that when creating a dialog on a
node, an active tag will be attached to it.</div>
<div>And if this node falls out of the cluster, then this tag
will be automatically activated like some other node and all
the dialog information (variables) will be available on it?<span
style="font-family:monospace"><br>
</span></div>
<div><br>
</div>
<div>There is also a question about transactions. How will the
response be handled if the owner of the transaction is not
available?<br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">пн, 12 июн. 2023 г. в 10:30,
Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org"
moz-do-not-send="true">bogdan@opensips.org</a>>:<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> <font face="monospace">Hi Denys,<br>
<br>
1) yes<br>
<br>
2) you can use the same sharing tag for multiple modules,
as time as from logical perspective, the switching of the
tags fits all the cases. For dialogs, you may need one tag
per node (to remember which node created the dialog), so
you may not be able to reuse here.<br>
<br>
Regards,<br>
</font>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="https://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">https://www.opensips-solutions.com</a>
<a href="https://www.siphub.com" target="_blank" moz-do-not-send="true">https://www.siphub.com</a></pre>
<div>On 6/9/23 1:30 PM, Denys Pozniak wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hello!</div>
<div>Thank you! The mechanism with a single tag for the
dispatcher works as it should.<br>
</div>
<div><br>
</div>
<div>But I still have a number of questions on related
topics:<br>
</div>
1) Should I declare this common dispatcher tag in the
parameters of the clusterer module?
<div>Then, after the start, the tag on the active node
will be set by an external script.</div>
<div><br>
<div> modparam("clusterer", "sharing_tag",
"dispatcher/1=backup")
<div> modparam("dispatcher", "cluster_sharing_tag",
"dispatcher")<br>
</div>
<div><br>
</div>
<div>2) I also want to replicate transactions and
dialogs, so should I declare own tags for each
cluster node?</div>
<div>Or like with a dispatcher do I need one common?</div>
<div><br>
modparam("clusterer", "sharing_tag",
"anycast1/1=active")<br>
modparam("clusterer", "sharing_tag",
"anycast2/1=backup")<br>
modparam("clusterer", "sharing_tag",
"anycast3/1=backup")<br>
modparam("clusterer", "sharing_tag",
"anycast4/1=backup")<br>
modparam("dialog", "dialog_replication_cluster",
1)<br>
modparam("tm", "tm_replication_cluster", 1)<br>
modparam("dispatcher", "cluster_sharing_tag",
"dispatcher")<br>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">вт, 6 июн. 2023 г. в
18:08, Bogdan-Andrei Iancu <<a
href="mailto:bogdan@opensips.org" target="_blank"
moz-do-not-send="true">bogdan@opensips.org</a>>:<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> <font face="monospace">Hi Denys,<br>
<br>
Even better if you have only one active opensips
instance - in this case you can use only one
sharing-tag across all nodes/servers in the
dispatcher cluster, tag to point to the active
instance. So, whenever you point the traffic to a
certain opensips instance, be sure to make the tag
active on that instance too.<br>
<a
href="https://opensips.org/html/docs/modules/3.2.x/clusterer.html#mi_clusterer_shtag_set_active"
target="_blank" moz-do-not-send="true">https://opensips.org/html/docs/modules/3.2.x/clusterer.html#mi_clusterer_shtag_set_active</a><br>
<br>
Best regards,<br>
</font>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="https://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">https://www.opensips-solutions.com</a>
<a href="https://www.siphub.com" target="_blank" moz-do-not-send="true">https://www.siphub.com</a></pre>
<div>On 6/6/23 4:11 PM, Denys Pozniak wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello!
<div><br>
</div>
<div>>So, in the dispatcher cluster you have
some active nodes, but also some stand-by,
right ?<br>
All cluster nodes have the same dynamic
routing protocol metric, so only one random
node can receive traffic from the network
point of view.<br>
</div>
<div>Well, accordingly, only the "active" node
can accept replays to SIP OPTIONS from the
dispatcher. And all other nodes see the
dispatcher peers as not alive.<br>
It's more a question of how to make other
nodes believe the status from the "active"
node and not influence it.<br>
<br>
</div>
<div>>And I see you did not set the this
cluster_sharing_tag modparam<br>
I have this option set, you probably didn't
notice in the initial thread.<br>
modparam("dispatcher", "cluster_sharing_tag",
"anycast1")<br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">вт, 6 июн.
2023 г. в 11:37, Bogdan-Andrei Iancu <<a
href="mailto:bogdan@opensips.org"
target="_blank" moz-do-not-send="true">bogdan@opensips.org</a>>:<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> <font face="monospace">Hi Denys,<br>
<br>
So, in the dispatcher cluster you have
some active nodes, but also some stand-by,
right ?<br>
<br>
And I see you did not set the this
cluster_sharing_tag modparam [1] - check
it out, it may help you in deciding which
nodes may broadcast the state inside the
cluster (for dispatcher)<br>
<br>
[1] <a
href="https://opensips.org/html/docs/modules/3.3.x/dispatcher.html#param_cluster_sharing_tag"
target="_blank" moz-do-not-send="true">https://opensips.org/html/docs/modules/3.3.x/dispatcher.html#param_cluster_sharing_tag</a><br>
<br>
Regards,<br>
</font>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="https://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">https://www.opensips-solutions.com</a>
<a href="https://www.siphub.com" target="_blank" moz-do-not-send="true">https://www.siphub.com</a></pre>
<div>On 6/2/23 5:39 PM, Denys Pozniak wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello!
<div><br>
</div>
<div>I need advice on how best to
implement the anycast + clusterer +
dispatcher scheme.<br>
In short, we want to build an
additional upper layer in front of our
sip legacy servers, on which traffic
balancing will take place.</div>
<div>Most likely it will look like
several nodes of the same clusterer
with a single public anycast address,
from which traffic will also go to the
public interfaces of the legacy sip
servers (via the dispatcher list).<br>
During testing, it turned out that if
we include the dispatcher module in
the clusterer, then the inactive nodes
of the cluster begin to affect the
general state of the legacy sip
servers on active node, since replays
to SIP OPTIONS reach only one active
node, though all nodes ping.</div>
<div><br>
</div>
<div>Thus, the sip server status is
constantly flapping on active node.<br>
Is it possible to somehow make all
other nodes believe the active node at
a given time and inherit its
dispatcher state?<br>
</div>
<div><br>
</div>
<div><b>node1:</b></div>
<div>modparam("clusterer",
"sharing_tag", "anycast1/1=active")<br>
</div>
modparam("clusterer", "sharing_tag",
"anycast2/1=backup")<br>
modparam("clusterer", "sharing_tag",
"anycast3/1=backup")<br>
modparam("clusterer", "sharing_tag",
"anycast4/1=backup")<br>
<br>
<div>modparam("dispatcher",
"cluster_sharing_tag", "anycast1")<br>
<br>
modparam("dispatcher", "db_url",
"text:///etc/opensips/dbtext")<br>
modparam("dispatcher", "attrs_avp",
"$avp(dsp_attrs_avp)")</div>
<div>modparam("dispatcher",
"script_attrs_avp",
"$avp(dsp_script_attrs_avp)")<br>
modparam("dispatcher", "hash_pvar",
"$avp(dsp_hash_pvar)")<br>
modparam("dispatcher",
"ds_ping_method", "OPTIONS")<br>
modparam("dispatcher", "ds_ping_from",
<a moz-do-not-send="true">"sip:ping@dispatcher"</a>)<br>
modparam("dispatcher",
"ds_ping_interval", 10)<br>
modparam("dispatcher",
"ds_probing_threshold", 2)<br>
modparam("dispatcher",
"ds_probing_mode", 1)<br>
modparam("dispatcher",
"options_reply_codes",
"501,403,404,400,200")<br>
modparam("dispatcher", "dst_avp",
"$avp(dsp_dst_avp)")<br>
modparam("dispatcher", "grp_avp",
"$avp(dsp_grp_avp)")<br>
modparam("dispatcher", "cnt_avp",
"$avp(dsp_cnt_avp)")<br>
modparam("dispatcher",
"persistent_state", 1)<br>
modparam("dispatcher", "cluster_id",
1)<br>
modparam("dispatcher",
"cluster_probing_mode", "by-shtag")<br>
<br>
<b>dispatcher:</b></div>
<div>id(int,auto) setid(int)
destination(string)
socket(string,null) state(int)
probe_mode(int) weight(string)
priority(int) attrs(string)
description(string)<br>
0:1:sip\:1.1.1.1\:5060;transport=udp::2:1:1:1:'':''</div>
<div>
<div>1:1:sip\:2.2.2.2\:5060;transport=udp::2:1:1:1:'':''</div>
<div>2:1:sip\:3.3.3.3\:5060;transport=udp::2:1:1:1:'':''</div>
<div><br>
</div>
<div>Sure, it is possible to attach an
additional public address to each
node and do not share dispatcher
state, but still I would like to
somehow find a solution for the
current scheme<br>
</div>
<div><br>
</div>
<div>--<br>
</div>
<div>
<div dir="ltr"
class="gmail_signature">
<div dir="ltr"><br>
<div>
<div>BR,</div>
<div>Denys Pozniak<br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr"><br>
<div>
<div>BR,</div>
<div>Denys Pozniak<br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr"><br>
<div>
<div>BR,</div>
<div>Denys Pozniak<br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr"><br>
<div>
<div>BR,</div>
<div>Denys Pozniak<br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>