Re: more nodes than vnodes

2022-06-15 Thread Luca Rondanini
Awesome, thank you so much! I completely missed the part "the token range that it hits will be split", now everything makes sense! Again, thanks a lot for your help! Luca On Wed, Jun 15, 2022 at 1:04 AM Hannu Kröger wrote: > Adding a token (which in essence is a vnode) means that the token ra

Re: more nodes than vnodes

2022-06-15 Thread Hannu Kröger
Adding a token (which in essence is a vnode) means that the token range that it hits will be split into two. And that data range which has a new owner will be replicated to the new owner node. If there are a lot of tokens (=vnodes) in the cluster, adding some amount of vnodes (e.g. num_tokens=16

Re: more nodes than vnodes

2022-06-15 Thread Luca Rondanini
Thanks a lot Hannu, really helpful! But isn't that crazy expensive? adding a vnode means that every vnode in the cluster will have a different range of tokens which means a lot of data will need to be moved around. Thanks again, Luca On Wed, Jun 15, 2022 at 12:25 AM Hannu Kröger wrote: > Whe

Re: more nodes than vnodes

2022-06-15 Thread Hannu Kröger
When a node joins a cluster, it gets (semi-)random tokens based on num_tokens value. Total amount of vnodes is not fixed. I don’t remember top of my hat if num_tokens can be different on each node but whenever you add a node, new vnodes get “created”. Existing token ranges will be split and som

Re: more nodes than vnodes

2022-06-15 Thread Luca Rondanini
ok, that makes sense, but does the partitioner add vnodes? is the number of vnodes fixed in a cluster? On Wed, Jun 15, 2022 at 12:10 AM Hannu Kröger wrote: > Hey, > > num_tokens is tokens per node. > > So in your case you would have 15 vnodes altogether. > > Cheers, > Hannu > > > On 15. Jun 2022

Re: more nodes than vnodes

2022-06-15 Thread Hannu Kröger
Hey, num_tokens is tokens per node. So in your case you would have 15 vnodes altogether. Cheers, Hannu > On 15. Jun 2022, at 10.08, Luca Rondanini wrote: > > Hi all, > > I'm just trying to understand better how cassandra works. > > My understanding is that, once set, the number of vnodes d