Chapter 3. State Transfer and High Availability Using Server Hinting

3.1. State Transfer

3.1.1. About State Transfer

State transfer occurs automatically in JBoss Data Grid whenever a node joins or leaves the cluster.
The new node receives the cache state from the existing nodes when it joins the cluster in both distribution and replication mode. State Transfer also occurs to nodes in redistributing the state after a node leaves the cluster in distribution mode.
The State transfer can occur regardless of whether the cache is in-memory state or persistent state.
  • In replication mode, the node joining the cluster receives a copy of the data currently on the other nodes in the cache. This occurs when the existing nodes push a part of the current cache state.
  • In distribution mode, each node contains a slice of the entire key space, which is determined through consistent hashing. When a new node joins the cluster it receives a slice of the key space that has been taken from each of the existing nodes. State transfer results in the new node receiving a slice of the key space and the existing nodes shedding a portion of the data they were previously responsible for.

3.1.2. Non-Blocking State Transfer

Non-Blocking State Transfer in JBoss Data Grid aims to minimize the time in which a cluster or node is unable to respond due to a state transfer in progress.
In JBoss Data Grid, Non-Blocking State Transfer
  • allows state transfer to occur without a drop in the performance of the cluster. However, if a drop in performance does occur during the state transfer it will not throw an exception, and will allow processes to continue.
  • does not add a mechanism for resolving data conflicts after a merge, however it ensures it is feasible to add one in the future.