1 Reply Latest reply on Apr 24, 2019 9:34 AM by rhn-support-abhati

    How can I restrict cluster members by IP

    michael.palata

      I tried to replace our memcached servers with Infinispan Server to get replication/distribution features for our services.

      Using the clustered-memcached.xml example configuration I can easily run Infinispan Servers on multiple hosts, but the problem is that the auto discovery/multicast feature will find all Infinispan Server instances on the whole network, meaning it will join all our stages (test, qa, production) together to a single cluster ... which is obviously not what anybody wants.

      Is there an example on how I can define cluster members by IP/port without any UDP multicast discovery magic? The documentation has zero content about isolating clusters.

       

      I already tried:

      <stacks default="tcp">

         <stack name="tcp">

         <transport type="TCP" socket-binding="jgroups-tcp"/>
         <protocol type="TCPPING">

         <property name="initial_hosts">192.168.10.13[7600]</property> <!-- still adds cluster member 192.168.10.12 -->

         <property name="port_range">0</property>

         </protocol>
         <protocol type="MERGE3"/>

       

       

      but still instances with other non-configured IPs automaticall join the same cluster.

       

      How can I properly and safely isolate clusters in the same network?

       

      UPDATE:

      removing <protocol type="UNICAST3"/> from the stack seems to help even though this has nothing to do with finding cluster members if I understood the JGroups docs correctly???

        • 1. Re: How can I restrict cluster members by IP
          rhn-support-abhati

          Hi Michael,

           

          Infinispan ships with a few different JGroups files (packaged in infinispan-core.jar) which means they will already be on your classpath by default. All you need to do is specify the file name, e.g., instead of jgroups.xml above, specify /default-configs/default-jgroups-tcp.xml.

          You can use the TCP clustering feature which allows you to specify unique IP:port and only those servers will be in a cluster, you have to use TCPPING protocol of jgroups to create a TCP cluster.

          If you want to run UDP based cluster then you can either create a cluster on any other multicast address(230.0.0.4 is the default)m, you can either setup different multicasts for your UAT,Prod and test and use UDP.

           

          For detailed documentation on Infinispan server, please refer here.