2 Replies Latest reply on May 24, 2014 11:41 PM by Vijay Bhaskar Chintalapati

    Can single node be part of multiple infinispan cluster.

    Manmeet Singh Newbie

      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.