Thank you, I was just curious about how this works. From: Tyler Hobbs [mailto:ty...@datastax.com] Sent: Friday, June 3, 2016 3:02 PM To: user@cassandra.apache.org Subject: Re: Token Ring Question
There really is only one token ring, but conceptually it's easiest to think of it like multiple rings, as OpsCenter shows it. The only difference is that every token has to be unique across the whole cluster. Now, if the token for a particular write falls in the “primary range” of a node living in DC2, does the code check for such conditions and instead put it on some node in DC1 ? Yes. It will continue searching around the token ring until it hits a token that belongs to a node in the correct datacenter. What is the true meaning of “primary” token range in such scenarios ? There's not really any such thing as a "primary token range", it's just a convenient idea for some tools. In reality, it's just the replica that owns the first (clockwise) token. I'm not sure what you're really asking, though -- what are you concerned about? On Wed, Jun 1, 2016 at 2:40 PM, Anubhav Kale <anubhav.k...@microsoft.com<mailto:anubhav.k...@microsoft.com>> wrote: Hello, I recently learnt that regardless of number of Data Centers, there is really only one token ring across all nodes. (I was under the impression that there is one per DC like how Datastax Ops Center would show it). Suppose we have 4 v-nodes, and 2 DCs (2 nodes in each DC) and a key space is set to replicate in only one DC – say DC1. Now, if the token for a particular write falls in the “primary range” of a node living in DC2, does the code check for such conditions and instead put it on some node in DC1 ? What is the true meaning of “primary” token range in such scenarios ? Is this how things works roughly speaking or am I missing something ? Thanks ! -- Tyler Hobbs DataStax<https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fdatastax.com%2f&data=01%7c01%7cAnubhav.Kale%40microsoft.com%7cf121131457ea451f60ff08d38bfabe92%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=n2DewZys%2fqY2A7nc%2bN0FqcF3%2bIfP3%2fNiTQeoYGxYDcU%3d>