Has anyone done any profiling of how well Voldemort distributes keys
amongst the partitions? The algorithm for consistent hashing does not
appear like it would favor a random distribution of keys and other
issues:
- The key is hashed using an FVN algorithm
- The partition ID for the key is determined by modulo division of the
key by the number of partitions
This algorithm makes sure that each partition is exactly the same
distance from the other partitions on the ring. However, it has some
other issues:
- The "randomness" of the hash becomes less important. Instead, only
the last few bits/bytes of the hash (the modulo partition count bits)
are ever evaluated. The remainder of the hash is ignored for the
consistent hashing.
- If a new partition is added to the system, every node is affected as
their share of the key space was reduced.
A different consistent hashing algorithm (such as suggested here:
http://weblogs.java.net/blog/2007/11/27/consistent-hashing) may not
have these same issues (but may have others, such as how long it takes
to calculate the partition ID may increase or the key space may not be
evenly distributed).
My questions are as follows:
1. Do people see issues with certain partitions becoming dominant or
overloaded using the current algorithms? Or is this masked by having
a relatively small number of nodes?
2. How many partitions are typically used by Voldemort adopters?
Choosing the number carefully (a factor of 2) looks like it would
speed performance -- we were considering using either 512 or 1024
partitions.
3. Were different algorithms tried for Voldemort and how was this
choice settled upon?
4. Has the Rebalancing project considered adding partitions to the
cluster or is that part of a separate effort?
I would like to do some profiling here to see how well our "real" and
"simulated" data maps onto the partitions using the current and other
algorithms but have not had the opportunity to do so yet.
Thanks,
Mark