On Wed, May 4, 2011 at 10:09 AM, Konstantin Naryshkin <konstant...@a-bb.net> wrote: > The way that I understand it (and that seems to be consistent with what was > said in this discussion) is that each DC has its own data space. Using your > simplified 1-10 system: > DC1 DC2 > 0 D1R1 D2R2 > 1 D1R1 D2R1 > 2 D1R1 D2R1 > 3 D1R1 D2R1 > 4 D1R1 D2R1 > 5 D1R2 D2R1 > 6 D1R2 D2R2 > 7 D1R2 D2R2 > 8 D1R2 D2R2 > 9 D1R2 D2R2 > > Each node is responsible for half of the ring in its own DC.
Okay that makes sense from a primary distribution perspective, but how do the nodes magically know where to send the data? When using NTS, if there are two nodes that overlap tokens, does NTS choose the "closest" node to place the primary on? If that is the case, then it makes sense. As far as the replication distribution... with a replica going to each data center {DC1:1,DC2:1} does NTS take the token and find the "closest" node in the opposite data center? ... so for token 7 in D1 replicating to D2, it will look for a node with a token range closest to that? In this scenario it would go to D2R2? That makes sense as far as why the replication was hot spotting before where my tokens were N,M,O,P where N<M<O<P any replica for N or M would get pinned to O, and any replicate for O or P would get pinned to M. I think the biggest confusion for me here was that .. I did not know you could have overlapping key ranges. Can you only do this when using NTS? I was stuck in the mind set of a "single ring" of tokens. Thanks again -Eric