Defines a hash function to pick the right node from the list of cluster nodes. Ideally, this function uses
consistent hashing, so that the same key maps to the same node despite cluster view changes. If a view change
causes all keys to hash to different nodes, then PartitionedHashMap will redirect requests to different nodes
and this causes unnecessary overhead.