databasecachingignitein-memory-database

How does the cache synchronization protocol work in Apache Ignite?


When we use Apache Ignite in In-Memory mode [1] and all the data is replicated to every node in the cluster (cacheMode is set as REPLICATED [2]), how does the cache synchronization protocol work?

NOTE: The question is not about the cache synchronization between the primary and the backup(s). [3]

<property name="cacheConfiguration">
  <bean class="org.apache.ignite.configuration.CacheConfiguration">
    <!-- some other properties -->
    <property name="cacheMode" value="REPLICATED"/>
  </bean>
</property>

[1] https://ignite.apache.org/arch/multi-tier-storage.html
[2] https://ignite.apache.org/docs/latest/data-modeling/data-partitioning#replicated
[3] https://ignite.apache.org/docs/latest/configuring-caches/configuring-backups


Solution

  • There’s only one algorithm: the rendezvous hashing algorithm. It’s used for both partitioned and replicated caches. First it’s used to map the key to the partition. Then the same algorithm is used to map partitions to nodes. More in this blog.