DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

chandrasekar.b03_190734 avatar image
chandrasekar.b03_190734 asked Erick Ramirez edited

In the DS201 quiz, how many vnodes does each node have?

In DS 201, the video lecture tells that by default, each node has 256 vnodes. But when i tried to attend the quiz on vnodes, it tells that there is 128 vnodes per node. Here i have attached a screenshot of the quiz i attended on DS201. Kindly provide me the valid answer !

academyds201virtual nodes
vnodes.jpg (240.4 KiB)
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered

I completely agree with you -- the question and the course content hasn't been clear about this.

The problem is that DS201 course question is referring to the num_tokens value configured in the DSE 6.0 cassandra.yaml. As Bettina already pointed out, I've previously explained it in question #4773. Allow me to explain.

Apache Cassandra

In open-source Cassandra, num_tokens is explicitly set to 256 in cassandra.yaml. This is true for both the latest C* 3.11.6 release and the current alpha release C* 4.0-alpha4:

num_tokens: 256

However if num_tokens is not set in cassandra.yaml, the number of tokens defaults to just 1 (see Config.java):

    public int num_tokens = 1;

DataStax Enterprise

The default cassandra.yaml that ships with DSE (for example, DSE 6.0 used in the DS201 course) has num_tokens set to 128 but it is commented out so it has no effect during bootstrap:

# num_tokens: 128

Unless num_tokens is explicitly set, a new node will bootstrap with just 1 token.

DS201 course

Specifically on your query about the Academy exercise on vnodes, the default value hasn't changed.

The quiz was asking about the default in the DSE 6.0.0 cassandra.yaml -- the version included in the VM image you downloaded for the course. And it was commented out with 128:

# num_tokens: 128

For the purposes of the DS201 course, 128 tokens is the answer. But I understand the confusion since if you install DSE without explicitly setting num_tokens, the node will bootstrap with just 1 token since the default configuration in DSE's Config.java is also 1 token:

    public int num_tokens = 1;

I've requested that the course be revised to avoid this confusion since it isn't really useful to someone who will eventually be a Cassandra administrator. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

bettina.swynnerton avatar image
bettina.swynnerton answered

Hi @chandrasekar.b03_190734,

this has been answered in detail in this post, let me redirect you:

https://community.datastax.com/questions/4773/default-vnodes-on-caasandra.html

Cheers!


Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.