3.2.5. ConsistentHashFactory
3.2.5.1. TopologyAwareConsistentHashFactory and TopologyAwareSyncConsistentHashFactory
The
TopologyAwareConsistentHashFactory
implementation enables Server Hinting. This attempts to distribute segments based on the topology information in the Transport configuration.
The
TopologyAwareConsistentHashFactory
implementation can be selected by setting one or more of the parameters in the transport configuration.
The
TopologyAwareSyncConsistentHashFactory
implementation can also be selected via the hash configuration:
<hash consistentHashFactory="org.infinispan.distribution.ch.TopologyAwareSyncConsistentHashFactory"/>
This configuration guarantees caches with the same members have the same consistent hash, and if the
machineId
, rackId
, or siteId
attributes are specified in the transport configuration it also spreads backup copies across physical machines/racks/data centers.
It has a potential drawback in that it can move a greater number of segments than necessary during re-balancing. This can be mitigated by using a larger number of segments.
Another potential drawback is that the segments are not distributed as evenly as possible, and actually using a very large number of segments can make the distribution of segments worse.