2 Replies Latest reply on May 24, 2014 11:41 PM by vbchin2

    Can single node be part of multiple infinispan cluster.

    manmeetjboss

      Our application is running in cluster. We have three nodes in cluster, say Node A, Node B and Node C. We are using infinspan in embdedded mode.

       

      We have three different named caches say Cache 1, Cache 2 and Cache 3. We want Cache 1 to be part of Infinispan Cluster-1 and Cache 2 and Cache 3 to be part of Infinispan Cluster-2. So we have defined two different cache managers and two different infinspan-config.xml.

       

      Infinispan-Config-1.xml

       

      <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:infinispan:config:5.2 http://www.infinispan.org/schemas/infinispan-config-5.2.xsd" xmlns="urn:infinispan:config:5.2">

          <global>

              <transport clusterName="Cluster1"

                  distributedSyncTimeout="50000" nodeName="NodeA"/>

              <globalJmxStatistics enabled="true"  allowDuplicateDomains="true"  cacheManagerName="CacheManager1"/>

          </global>

          <namedCache name="Cache1" >

              <clustering mode="replication">

                  <stateTransfer chunkSize="10000" fetchInMemoryState="true"

                      timeout="240000" />

              </clustering>

          </namedCache>

      </infinispan>

       

      Infinispan-Config-2.xml


      <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:infinispan:config:5.2 http://www.infinispan.org/schemas/infinispan-config-5.2.xsd" xmlns="urn:infinispan:config:5.2">

          <global>

              <transport clusterName="Cluster2"

                  distributedSyncTimeout="50000" nodeName="NodeA"/>

              <globalJmxStatistics enabled="true"  allowDuplicateDomains="true"  cacheManagerName="CacheManager2"/>

          </global>

          <namedCache name="Cache2" >

              <clustering mode="replication">

                  <stateTransfer chunkSize="10000" fetchInMemoryState="true"

                      timeout="240000" />

              </clustering>

          </namedCache>

       

          <namedCache name="Cache3" >

              <clustering mode="replication">

                  <stateTransfer chunkSize="10000" fetchInMemoryState="true"

                      timeout="240000" />

              </clustering>

          </namedCache>

      </infinispan>

       

      Now if Node A updates anything in Cache 1(part of Cluster-1), changes are getting replicated in Cache 1 of all other nodes i.e Node B and Node C. But if node A updates anything in Cache 2 or Cache 3 (part of Cluster-2), changes are not getting replicated in other two nodes.

        • 1. Re: Can single node be part of multiple infinispan cluster.
          wdfink

          Yes, each container might have its own distinct JGroups transport in the same JVM.

          • 2. Re: Can single node be part of multiple infinispan cluster.
            vbchin2

            As Wolf-Dieter mentioned, it mostly depends on :

            1. When it comes to clustering, JGroups XML file determines how the discovery of nodes happen, what transport is used etc. Having said that, what do your jgroups.xmls look like?
            2. If using UDP multicast in jgroups.xml files, have you ensured that each file uses a unique multicast address for the purpose of clustering? All the nodes forming a cluster should have the same multicast IP address in the configuration files.

            Sharing the jgroups.xml files and code snippets should help in identifying further what the underlying issue is.