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

Tri avatar image
Tri asked ·

What are the effects when seed nodes are partially down?

A single physical machine is used to simulate a multinodes Cassandra clusters. The nodes have their cassandra.yaml which configure the seeds nodes as:

seed_provider:
    - class_name: org.apache.cassandra.locator.SimpleSeedProvider
      parameters:
          - seeds: "127.0.0.1, 127.0.0.2, 127.0.0.3"

Q1. Is it OK for the seed node to have it's own IP address listed in the seeds setting?

Q2. Let's assume one or two seed nodes are temporarily down. Would that increase a lot of gossip messages between running nodes?

seeds
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 ·

1. Yes, it is. If you think about it, a single-node cluster will have itself as a seed-node. We recommend delegating 2 nodes in each DC to be seeds so in a 3-node cluster, 2 of the nodes will be seeds.

2. No, since the other nodes know that the other nodes are down. That's not quite how gossip works.

What typically happens is that a node will gossip with 2 or 3 other nodes every second. One of those nodes is a seed node. Nodes always gossip with at least one seed node in order for gossip information to converge very quickly.

Imagine you live on a street with 10 other neighbours. Your neighbour at house #5 is a gossipmonger, a person who spreads gossip about other people. If every person on the street gossips with any 2 other neighbours, news will spread relatively slowly. But if every person always gossip with house #5 plus 1 other neighbour, the news will spread really fast because everyone ends up telling house #5 all the street news and this neighbour passes it on to everyone else.

The same thing happens for a down node -- a node which tries to gossip with it will quickly tell a seed node that its down and the seed node will quickly spread it to other seed nodes plus the rest of the nodes. Cassandra uses an algorithm to detect down nodes and changes in the cluster topology so that requests don't get routed to nodes which are down, overloaded or unresponsive.

For more info, see Failure detection and recovery. Cheers!

2 comments 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.

Yes, it is. If you think about it, a single-node cluster will have itself as a seed-node.

Maybe it's not a good thing todo. But just for the sake of learning. On a single-node cluster, I set the - seeds: "" (empty string). I noticed that the node boots OK.

The single node is its own universe. It doesn't need seed node nor to gossip to anyone. However, without any known seed node, would that single node cluster be perfectly functional?

0 Likes 0 · ·

I guess it depends on your definition of "perfectly functional". :)

If it will remain as a single-node then there's no reason for it to gossip with other nodes so there's no issue. Cheers!

P.S. "No seeds" is by the way an invalid configuration in Cassandra. Your node may "function" but YMMV.

0 Likes 0 · ·