[sheepdog] obbject placement

Liu Yuan namei.unix at gmail.com
Wed Feb 11 11:44:28 CET 2015

On Sun, Feb 08, 2015 at 08:46:01PM +0100, Corin Langosch wrote:
> Hi guys,
> afaik sheepdog uses consistent hashing to map objects to nodes. But how do you choose where the individual ec-chunks of
> an object should go? Consistent hashing cannot be used here because different ec-chunks of the same object might get
> mapped to the same node.
> I looked at the sources and got an idea: you calculate a "base" node for the object and then for each ec-chunk you add
> its index. Example: we have 10 nodes (0..9), consistent hashing calculates node 7 for our object. As we have 4:2
> encoding, we get the ec-chunks stored on [7,8,9,0,1,2]?
> Is my assumption correct, or how do you actually do it?

Yes, you are right if we don't consider the virtual nodes added to consistent
hashing to mitigate the object migration problem.

But with virtual nodes in the picture, we can add one more rule to make sure
all the data and ec-chunks are on the different physical nodes.


More information about the sheepdog mailing list