Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between a node and vnode

I'm new to Cassandra and I'm confused about the concepts of nodes and vnodes.

Here's what I had read: The hierarchy of elements in Cassandra is: Cluster - Data Centre - Rack-Server-Node The node was described as a data storage layer within a server and the server was the actual physical machine containing the Cassandra software.

From what I could understand, it seems to me that vnodes are different/more efficient than nodes in certain cases.

However I'm having trouble placing them in this hierarchy.

Is vnode just a different kind of node in the above hierarchy. or is it that after the concept of vnode was introduced, the element called server in the above hierarchy is now called a node and the one called node in the above hierarchy is now called a vnode!

like image 534
Vishal Sharma Avatar asked Feb 10 '26 19:02

Vishal Sharma


1 Answers

You can see vnodes as a next step in the hierarchy you've described, after physical nodes.

Vnodes help redistribute data based on tokens when you are resizing your cluster and making data distribution much more flexible.

There's a good explanation from datastax site: https://www.datastax.com/dev/blog/virtual-nodes-in-cassandra-1-2

EDIT: In old versions of Cassandra, tokens were splitted in the way that each server had one token(range) and it was replicated between physical machines based on replication factor. vnodes architecture (also used in riak for example) makes virtualization of the "node" layer, splitting the ring into high number of token ranges (vnodes) and each physical node (cassandra service) has number of vnodes running on it. Please review the link provided, there's very good explanation with examples.

like image 178
nevsv Avatar answered Feb 14 '26 03:02

nevsv



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!