user3831642
user3831642

Reputation: 11

infinispan key replication across servers

I would like to know if there is any such config in infinispan where in a key can be replicated across different servers in a clustered environment. For example, I have a key, say key 1. In my cluster I would like to run node 1 & node 2 on server 1 and node 3 & node 4 on server 2. My requirement is, can key 1 be distributed among server 1 and server 2 on any of their nodes, provided all the 4 nodes are up and running. I tried the below infinispan config on my local servers and key is being replicated on a different node in the same server but not on a different server. Kindly help.

<global >
        <globalJmxStatistics enabled="true" />
        <transport clusterName="demoCluster">
            <properties>
                <property name="configurationFile" value="jgroups.xml"/>
            </properties>
        </transport>
    </global>
    <default>
        <jmxStatistics enabled="true" />    
        <clustering mode="distribution">
          <sync>
            <!-- <hash numOwners="2"/> -->
          </sync>
        </clustering>
   </default>

Upvotes: 0

Views: 203

Answers (1)

user3831642
user3831642

Reputation: 11

There is an attribute called machineId in transport element of the infinispan cache config. Please refer to https://docs.jboss.org/author/display/ISPN/ServerHinting for more details. Hope this would help someone :)

Upvotes: 1

Related Questions