<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <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 class="moz-txt-link-freetext" href="https://opensips.org/html/docs/modules/3.3.x/dispatcher.html#param_cluster_sharing_tag">https://opensips.org/html/docs/modules/3.3.x/dispatcher.html#param_cluster_sharing_tag</a><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/2/23 5:39 PM, Denys Pozniak wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+x3AxoeyMmFfQbMgrY-AUfO=QTvAY9NasFtTD=LsvnDShbQVA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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 class="moz-txt-link-rfc2396E" href="sip:ping@dispatcher">"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"
              data-smartmail="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 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>
    <br>
  </body>
</html>