PLANNED MAINTENANCE

Hello, DataStax Community!

We want to make you aware of a few operational updates which will be carried out on the site. We are working hard to streamline the login process to integrate with other DataStax resources. As such, you will soon be prompted to update your password. Please note that your username will remain the same.

As we work to improve your user experience, please be aware that login to the DataStax Community will be unavailable for a few hours on:

  • Wednesday, July 15 16:00 PDT | 19:00 EDT | 20:00 BRT
  • Thursday, July 16 00:00 BST | 01:00 CEST | 04:30 IST | 07:00 CST | 09:00 AEST

For more info, check out the FAQ page. Thank you for being a valued member of our community.


question

lingzi.kong_192056 avatar image
lingzi.kong_192056 asked ·

Do nodes remember which nodes they gossiped with before?

Hello,

The information in the two screenshots below seems conflicting. Can you please help explain whether nodes remember the other nodes they have ever gossiped with before?

Thank you in advance!


cassandragossip
1592533822545.png (54.7 KiB)
1592533832697.png (343.6 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.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

That's a fantastic question to ask! You've obviously been paying attention to the course. ;)

I can see where the wording in the two statements could be confusing because they are referring to two different things. I'll try to explain the differences.

Docs - About Gossip

On the Internode communications page, this statement refers to nodes knowing about the topology of the cluster (other nodes) even after it has been restarted:

By default, a node remembers other nodes it has gossiped with between subsequent restarts.

Each node records cluster topology information that other nodes have shared over gossip in the system.peers table. It includes information such as IP address, host ID, data center and assigned tokens:

CREATE TABLE system.peers (
    peer inet PRIMARY KEY,
    data_center text,
    host_id uuid,
    preferred_ip inet,
    rack text,
    release_version text,
    rpc_address inet,
    schema_version uuid,
    tokens set<text>
)

This is a table in Cassandra and so is persistent across restarts.

Course - DS201 C* Foundations

In the Gossip unit of the DS201 Academy course, this statement refers to nodes not knowing about which nodes they gossiped with in the prior round of gossip:

Nodes do not track which nodes they gossiped with prior

The key in that statement is "prior".

As the slide states, a node initiates a round of gossip every second. It picks up to 3 nodes to gossip with but it does not choose which nodes -- they are picked randomly. It does not track which nodes it gossiped with in the prior rounds but it knows the state of other nodes based on the last time they gossiped with each other.

And those are the key points of differentiation:

  • not remembering the nodes it gossiped with in the prior gossip round, versus
  • remembering information about nodes it gossiped with.

If you're interested, have a look at the algorithm used for gossiping with other nodes in the Gossiper.java class (link to C* 3.11.6), specifically the private GossipTask class and the sendGossip() method. Cheers!

1 comment 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.

Thank you so much for the detailed explanation!

1 Like 1 · ·