-
1. Re: How to make replication of cache on particular Node in cluster ?
pferraro Jan 30, 2013 10:04 AM (in response to hitesysony87)Whe you use DIST mode, the data is only store on X nodes in your cluster (where X is the number of "owners"), but the data is available from *any* node. If a node attempts to access a cache entry that is stored on another node, it will perform a remote lookup to retrieve the value. Results from remote lookups will be cached on the local node for the duration (in ms) specified by the <distributed-cache l1-lifespan="..."/> attribute.
The process for selecting the nodes on which a given cache entry will be stored is based on Infinispan's default consistent hash function. Due to the nature of how a consistant hash works - you cannot take a randomly generated key (as is the case for HttpSession IDs) and map them to specific nodes. Only if you have full control over the key generation itself can you create your own hash function that conforms to your mapping rules.
Can I ask why you have such a requirement? If your data needs to be backed up in such a rigid way, why not just use 2 separate clusters (N1, N2) + (N3, N4)?