docs/data-and-services/data-partitioning.md
While all Redisson Java objects are fully compatible with Valkey and Redis cluster, it's important to note that the state of any single object instance remains confined to its assigned master node and cannot be distributed or partitioned across multiple master nodes within the cluster. This limitation is addressed by Redisson PRO, which offers data partitioning capabilities for select object types, allowing their state to be spread across multiple master nodes in the cluster.
This partitioning feature provides significant advantages:
Redisson distributes data across 231 partitions by default. Minimal number of partition is 3. These partitions are evenly distributed across all nodes in cluster, ensuring each node manages approximately the same number of partitions.
For example:
This balanced distribution is achieved through Redisson's specialized slot distribution algorithm, which optimizes data placement across your cluster.
Data partitioning is available for the following data structures and cache implementations:
Joined Valkey or Redis deployments
Multiple Valkey or Redis deployments can be combined and utilized as a single partitioned (sharded) deployment, allowing for horizontal scaling of your data across several nodes.
RedissonClient redisson1 = ...;
RedissonClient redisson2 = ...;
RedissonClient redisson3 = ...;
RedissonClient redisson = ShardedRedisson.create(redisson1, redisson2, redisson3);