4 ms·
It seems a simple key mod bucket_size works to divide a workload based on a numeric key. I imagine this has a different distribution which works better for cer
by simpsond 12y ago
It seems a simple key mod bucket_size works to divide a workload based on a numeric key. I imagine this has a different distribution which works better for certain use cases. Anyone have an example of when mod will fail for something like this?
Edit: The paper covers this.
- cycrutchfield 12y agohttp://en.wikipedia.org/wiki/Consistent_hashing http://en.wikipedia.org/wiki/Consistent_hashing
- infinite8s 12y agoIt fails when bucket_size changes.
- jones1618 12y agoThe problem this algorithm solves is not how to distribute keys in buckets (key mod bucket_size works fine for that) but how to gracefully adapt when bucket_size needs to increase. This algorithm minimizes the number of keys that have to be moved to new buckets while incurring no memory overhead nor requiring a complex data structure.