Re: [jgroups-users] suggestions for working with OpenStack (NAT question)

Questions/problems related to using JGroups <[email protected]> Tue, 21 Jan 2020 09:49:55 -0500
Newsgroups gmane.comp.java.javagroups.general
Message-ID <mailman.29999.1579618243.2125.javagroups-users@lists.sourceforge.net>
--===============0722201312942775426==
Content-Type: multipart/alternative; boundary="0000000000008e5c18059ca78779"

--0000000000008e5c18059ca78779
Content-Type: text/plain; charset="UTF-8"

Thanks for this.

I didn't know about the external_addr field (I need to take some time off
and go through all the jgroups manuals again....). I think that could solve
the problem for us very easily.

Will hopefully get a chance to try this soon so we at least have a plan for
the customer asking about it.

Thanks!
Bobby


On Tue, Jan 21, 2020 at 7:21 AM Questions/problems related to using JGroups
<[email protected]> wrote:

>
>
> On 20.01.20 18:55, Questions/problems related to using JGroups wrote:
> > Hi,
> >
> > A customer wants to use our product on OpenStack, which (I assume you
> know)
>
> I know it by name, but I've never used it
>
> > has private addresses for every node and then a floating IP
> > address which can be reached everywhere. So they have nodes "not on the
> > same network, on different cloud providers / zones with incompatible
> > addresses scheme."
> >
> > We're using a tcp stack, jgroups 4.1.8, and TCP#bind_addr has to be set
> > to the local, private, address or else jgroups can't bind to it. But
> > then other nodes can't reach that node. Do you have suggestions about
> > how to make this work?
>
> Yes, you could bind JGroups to the private IP address and set
> external_addr to the public IP address. This means JGroups will bind to
> bind_addr:bind_port, but expose its address (in the discovery process)
> as external_addr:(external_port). Note that if the latter is not set, it
> will be the same value as bind_port (even if it is 0; then the ephemeral
> port will be used).
>
> In TCPPING.initial_hosts, you'd list the *public* (external_addr) IP
> addresses:ports
>
> > I don't have access to an OpenStack setup like this to test; I can only
> > test in one region, so I don't know if using floating IPs for
> > TCPPING#initial_hosts should work or not for the nodes to find each
> > other. (If so, that's great, but would mean a lot of work for us to have
> > the nodes carry around a 2nd IP address to pass to each other for other
> > reasons.)
>
> That should work, and I don't think you need to pass around a second IP
> address, as all nodes are only known by their public IPs.
>
> As an alternative, which works across different cloud regions and cloud
> providers, you could use the TUNNEL/GossipRouter combo, see [1] fpr
> details.
> Cheers,
>
> [1]
> http://belaban.blogspot.com/2019/12/spanning-jgroups-kubernetes-based.html
>
> > Thanks,
> > Bobby
> >
> >
> >
> > _______________________________________________
> > javagroups-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/javagroups-users
> >
>
> --
> Bela Ban | http://www.jgroups.org
>
>
>
> _______________________________________________
> javagroups-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/javagroups-users
>

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

<div dir=3D"ltr">Thanks for this.<div><br></div><div>I didn&#39;t know abou=
t the=C2=A0external_addr field (I need to take some time off and go through=
 all the jgroups manuals again....). I think that could solve the problem f=
or us very easily.</div><div><br></div><div>Will hopefully get a chance to =
try this soon so we at least have a plan for the customer asking about it.<=
/div><div><br></div><div>Thanks!</div><div>Bobby</div><div><br></div></div>=
<br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue=
, Jan 21, 2020 at 7:21 AM Questions/problems related to using JGroups &lt;<=
a href=3D"mailto:[email protected]">javagroups-users@l=
ists.sourceforge.net</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quo=
te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204=
);padding-left:1ex"><br>
<br>
On 20.01.20 18:55, Questions/problems related to using JGroups wrote:<br>
&gt; Hi,<br>
&gt; <br>
&gt; A customer wants to use our product on OpenStack, which (I assume you =
know)<br>
<br>
I know it by name, but I&#39;ve never used it<br>
<br>
&gt; has private addresses for every node and then a floating IP <br>
&gt; address which can be reached everywhere. So they have nodes &quot;not =
on the <br>
&gt; same network, on different cloud providers / zones with incompatible <=
br>
&gt; addresses scheme.&quot;<br>
&gt; <br>
&gt; We&#39;re using a tcp stack, jgroups 4.1.8, and TCP#bind_addr has to b=
e set <br>
&gt; to the local, private, address or else jgroups can&#39;t bind to it. B=
ut <br>
&gt; then other nodes can&#39;t reach that node. Do you have suggestions ab=
out <br>
&gt; how to make this work?<br>
<br>
Yes, you could bind JGroups to the private IP address and set <br>
external_addr to the public IP address. This means JGroups will bind to <br=
>
bind_addr:bind_port, but expose its address (in the discovery process) <br>
as external_addr:(external_port). Note that if the latter is not set, it <b=
r>
will be the same value as bind_port (even if it is 0; then the ephemeral <b=
r>
port will be used).<br>
<br>
In TCPPING.initial_hosts, you&#39;d list the *public* (external_addr) IP <b=
r>
addresses:ports<br>
<br>
&gt; I don&#39;t have access to an OpenStack setup like this to test; I can=
 only <br>
&gt; test in one region, so I don&#39;t know if using floating IPs for <br>
&gt; TCPPING#initial_hosts should work or not for the nodes to find each <b=
r>
&gt; other. (If so, that&#39;s great, but would mean a lot of work for us t=
o have <br>
&gt; the nodes carry around a 2nd IP address to pass to each other for othe=
r <br>
&gt; reasons.)<br>
<br>
That should work, and I don&#39;t think you need to pass around a second IP=
 <br>
address, as all nodes are only known by their public IPs.<br>
<br>
As an alternative, which works across different cloud regions and cloud <br=
>
providers, you could use the TUNNEL/GossipRouter combo, see [1] fpr details=
.<br>
Cheers,<br>
<br>
[1] <br>
<a href=3D"http://belaban.blogspot.com/2019/12/spanning-jgroups-kubernetes-=
based.html" rel=3D"noreferrer" target=3D"_blank">http://belaban.blogspot.co=
m/2019/12/spanning-jgroups-kubernetes-based.html</a><br>
<br>
&gt; Thanks,<br>
&gt; Bobby<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; javagroups-users mailing list<br>
&gt; <a href=3D"mailto:[email protected]" target=3D"_b=
lank">[email protected]</a><br>
&gt; <a href=3D"https://lists.sourceforge.net/lists/listinfo/javagroups-use=
rs" rel=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/list=
s/listinfo/javagroups-users</a><br>
&gt; <br>
<br>
-- <br>
Bela Ban | <a href=3D"http://www.jgroups.org" rel=3D"noreferrer" target=3D"=
_blank">http://www.jgroups.org</a><br>
<br>
<br>
<br>
_______________________________________________<br>
javagroups-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank"=
>[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/javagroups-users" r=
el=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/lis=
tinfo/javagroups-users</a><br>
</blockquote></div>

--0000000000008e5c18059ca78779--


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


--===============0722201312942775426==
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

--===============0722201312942775426==--