<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">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">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">https://www.opensips-solutions.com</a>
  <a href="https://www.siphub.com" target="_blank">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>"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">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">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>