Partitioned
The default cache mode is partitioned mode. This mode is designed for achieving high scalability. In partitioned mode, the cache data is divided equally into a number of partitions, defined in the configuration, and the partitions are distributed equally between participating nodes. By default, the partition count is 2: one primary and one backup. You can modify the backup copy count.
The following diagram describes the concept. We have three participating JVMs and one cache. The cache has three keys, Key 1, Key 2, and Key 3, and the cache configuration is set with a default backup=1. The distributed cache mode keeps a primary copy of Key 1 in JVM 1 and a backup of of Key 1 in JVM 2. Similarly for Key 2 and Key 3; it keeps a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access