The Infinispan provides two modes:
Local mode-Infinispan provides a non-clustered pattern in which Infinispan can be considered a single node, in-memory data caching. Compared to cluster mode, because we do not consider the scalability of the cluster, fault tolerance, and so on, which makes the infinispan performance is higher, the use of more efficient.
Cluster mode-a cluster pattern is a cluster of multiple Infinispan servers (Infinispan instances), where all the points in the cluster form a data grid. The state of a node in a grid needs to be replicated to all other nodes, or to a subset of nodes. The number of nodes in this subset determines the fault tolerance and scalability of the Infinispan data grid, and the number of subsets nodes hinders the scalability of the Infinispan grid. In cluster mode, the nodes are replicated by jgroups, which we will discuss in detail later. Depending on the replication strategy, the cluster pattern can be divided into distributed mode, replication mode and invalid mode