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

Questions/problems related to using JGroups <[email protected]> Tue, 21 Jan 2020 13:20:10 +0100
Newsgroups gmane.comp.java.javagroups.general
Message-ID <mailman.5653.1579609231.1535.javagroups-users@lists.sourceforge.net>

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