Search code examples
replicationinfinispan

Can Infinispan be forced to fully replicate to a new cluster member


Looking through the Infinispan getting started guide it states [When in replication mode]

Infinispan only replicates data to nodes which are already in the cluster. If a node is added to the cluster after an entry is added, it won’t be replicated there.

Which I read as any cluster member will always be ignorant of any data that existed in the cluster before it became a cluster member.

Is there a way to force Infinispan to replicate all existing data to a new cluster member?

I see two options currently but I'm hoping I can just get Infinispan to do the work.

  1. Use a distributed cache and live with the increase in access times inherent in the model, but this at least leaves Infinispan to handle its own state.
  2. Create a Listener to listen for a new cache member joining and iterate through the existing data, pushing it into the new member. Unfortunately this would in effect cause every entry to replicate out to the existing cluster members again. I don't think this option will fly.

Solution

  • This information sounds as misleading/outdated. When the node joins a cluster, a rebalance process is initiated and when you query for these data during the rebalance prior to delivering these data to the node, the entry is fetched by remote RPC.