infinispan cluster of a predefined set of IP Addre

2019-09-14 23:51发布

问题:

I am using infinispan to distribute the cache over multiple nodes using multicast which is working fine.

Unfortunately, according to the System Admin requirements they don't want to allow multicast and they gave me a set of the possible node IP addresses.

Is there a way programatically or via infinispan.xml or jgroups.xml to define the set of IP Addresses of the nodes instead of auto discovery? If not is there an alternative cache that fit the same requirement?

回答1:

You need to adjust JGroups configuration. By default Infinispan uses default-configs/default-jgroups-udp.xml but you should take default-configs/default-jgroups-tcp.xml as a starter if multicast/UDP is not allowed in your network. In your derived configuration replace the MPING protocol (which uses auto-discovery, too) with TCPPING - see JGroups docs.