[jgroups-users] question about FD_SOCK

Questions/problems related to using JGroups <[email protected]> Tue, 7 Jul 2020 15:43:58 -0400
Newsgroups gmane.comp.java.javagroups.general
Message-ID <mailman.150423.1594152982.1370.javagroups-users@lists.sourceforge.net>
--===============7872073262378542369==
Content-Type: multipart/alternative; boundary="000000000000829b1705a9df3860"

--000000000000829b1705a9df3860
Content-Type: text/plain; charset="UTF-8"

Hi,

We're using JGroups 4.1.8 and a tcp stack but removed FD_SOCK some time
ago. (Current stack below.)

Am not sure why we removed FD_SOCK way back when, but I think it was a
last-minute response to it opening random ports (a customer didn't like
that) and there wasn't time to fix things.

Anyway, given what we have now, would it still make sense to add FD_SOCK
back in, between MERGE3 and FD_ALL, I assume?

Do avoid random ports being used (some customers need everything known
ahead of time for firewall rules), do we just need to set start_port
and client_bind_port? And make sure they're different clearly.

We don't need to set external_addr if that's already been set in TCP, right?

Thanks,
Bobby


Current stack for reference:

        List<Protocol> stack = new ArrayList<>();
        final Protocol tcp = new TCP()
            .setValue("bind_addr", InetAddress.getByName( [get bind
address] ))
            .setValue("bind_port", bindingPort)
            .setValue("thread_pool_min_threads", 1)
            .setValue("thread_pool_keep_alive_time", 5000)
            .setValue("send_buf_size", 640000)
            .setValue("sock_conn_timeout", 300)
            .setValue("recv_buf_size", 5000000);
        // [based on properties may set external_addr as well]
        stack.add(tcp);
        stack.add(new TCPPING()
            .setValue("initial_hosts", [code to get list] )
            .setValue("send_cache_on_join", true)
            .setValue("port_range", 0));
        stack.add(new MERGE3()
            .setValue("min_interval", 10000)
            .setValue("max_interval", 30000));
        stack.add(new FD_ALL()
            .setValue("timeout", [get from properties] ));
        stack.add(new VERIFY_SUSPECT()
            .setValue("timeout", 1500));
        stack.add(new BARRIER());
        stack.add(new NAKACK2()
            .setValue("use_mcast_xmit", false));
        stack.add(new UNICAST3());
        stack.add(new STABLE()
            .setValue("desired_avg_gossip", 50000)
            .setValue("max_bytes", 4000000));
        stack.add( [our own auth protocol] );
        stack.add(new GMS()
            .setValue("join_timeout", 3000));
        stack.add(new MFC()
            .setValue("max_credits", 2000000)
            .setValue("min_credits", 800000));
        stack.add(new FRAG2());
        stack.add(new STATE_TRANSFER());
        return new JChannel(stack);

--000000000000829b1705a9df3860
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,<div><br></div><div>We&#39;re using JGroups 4.1.8 and a=
 tcp stack but removed FD_SOCK some time ago. (Current stack below.)</div><=
div><br></div><div>Am not sure why we removed FD_SOCK way back when, but I =
think it was a last-minute response to it opening random ports (a customer =
didn&#39;t like that) and there wasn&#39;t time to fix things.</div><div><b=
r></div><div>Anyway, given what we have now, would it still make sense to a=
dd FD_SOCK back in, between MERGE3 and FD_ALL, I assume?</div><div><br></di=
v><div>Do avoid random ports being used (some customers need everything kno=
wn ahead of time for firewall rules), do we just need to set=C2=A0start_por=
t and=C2=A0client_bind_port? And make sure they&#39;re different clearly.</=
div><div><br></div><div>We don&#39;t need to set=C2=A0external_addr if that=
&#39;s already been set in TCP, right?</div><div><br></div><div>Thanks,</di=
v><div>Bobby</div><div><br></div><div><br></div><div>Current stack for refe=
rence:</div><div><br></div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 List&lt;Protoco=
l&gt; stack =3D new ArrayList&lt;&gt;();<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 fin=
al Protocol tcp =3D new TCP()<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
.setValue(&quot;bind_addr&quot;, InetAddress.getByName( [get bind address] =
))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setValue(&quot;bind_port&q=
uot;, bindingPort)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setValue(&=
quot;thread_pool_min_threads&quot;, 1)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 .setValue(&quot;thread_pool_keep_alive_time&quot;, 5000)<br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setValue(&quot;send_buf_size&quot;,=
 640000)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setValue(&quot;sock_=
conn_timeout&quot;, 300)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setV=
alue(&quot;recv_buf_size&quot;, 5000000);<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 //=
 [based on properties=C2=A0may set=C2=A0external_addr as well]<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 stack.add(tcp);<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 stack.a=
dd(new TCPPING()<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setValue(&qu=
ot;initial_hosts&quot;, [code to get list] )<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 .setValue(&quot;send_cache_on_join&quot;, true)<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setValue(&quot;port_range&quot;, 0));<b=
r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 stack.add(new MERGE3()<br>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 .setValue(&quot;min_interval&quot;, 10000)<br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setValue(&quot;max_interval&quot;, =
30000));<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 stack.add(new FD_ALL()<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setValue(&quot;timeout&quot;, [get from=
 properties] ));<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 stack.add(new VERIFY_SUSPEC=
T()<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setValue(&quot;timeout&qu=
ot;, 1500));<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 stack.add(new BARRIER());<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 stack.add(new NAKACK2()<br>=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 .setValue(&quot;use_mcast_xmit&quot;, false));<br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 stack.add(new UNICAST3());<br>=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 stack.add(new STABLE()<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 .setValue(&quot;desired_avg_gossip&quot;, 50000)<br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 .setValue(&quot;max_bytes&quot;, 4000000));<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 stack.add( [our own auth protocol] );<br>=C2=A0 =C2=A0=
 =C2=A0 =C2=A0 stack.add(new GMS()<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 .setValue(&quot;join_timeout&quot;, 3000));<br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 stack.add(new MFC()<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .se=
tValue(&quot;max_credits&quot;, 2000000)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 .setValue(&quot;min_credits&quot;, 800000));<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 stack.add(new FRAG2());<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 stack.=
add(new STATE_TRANSFER());<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 return new JChann=
el(stack);<br></div><div><br></div></div>

--000000000000829b1705a9df3860--


--===============7872073262378542369==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============7872073262378542369==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
javagroups-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/javagroups-users

--===============7872073262378542369==--