Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

rockclimber avatar image
rockclimber asked ·

How do I migrate from SimpleSnitch to GossipingPropertyFileSnitch without downtime?

Our Cassandra cluster has 9 nodes and uses SimpleSnitch (it is what it is). We'd like to move to GossipingPropertyFileSnitch (in single DC, still). Is that possible to perform it without downtime?

We've got the following plan:

1. fill cassandra-rackdc.properties on the each node with:

dc=datacenter1
rack=rack1

2. set endpoint_snitch in cassandra.yaml on the each node:

endpoint_snitch: GossipingPropertyFileSnitch

3. restart the nodes one at a time.

We assume that Cassandra will assemble a cluster with a new snitch successfully, as far as all the nodes are still located in the same DC. Is that assumption correct?

Next we want:

1. switch topology from SimpleStrategy to NetworkTopologyStrategy for each keyspace.

2. place the data to the dedicated racks and nodes as described here.

Is this the correct approach? If not, then can you please advice the correct way?

Many thanks

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

At a high level, it is as simple as (1) deploying the rack/DC properties file, (2) setting GossipingPropertyFileSnitch, then (3) restarting Cassandra. And yes, it is possible to do it without downtime provided you are not making a topology change and simply switching to a different snitch.

It's also important that you don't make any other changes until (4) you've completed the switch on all nodes and all nodes have been restarted, and (5) performed end-to-end verification that the snitch change was successful.

For details, see Switching Cassandra snitches.

We assume that Cassandra will assemble a cluster with a new snitch successfully, as far as all the nodes are still located in the same DC. Is that assumption correct?

Cassandra will not "assemble" a cluster -- the nodes will simply start with GPFS and operate as normal.

2. place the data to the dedicated racks and nodes as described here.

Is this the correct approach? If not, then can you please advice the correct way?

You cannot change a node's DC or rack configuration once it is part of a cluster. Be aware that you have to use the default datacenter1 DC and rack1 rack -- it isn't possible to change these values since that constitutes a topology change which will require downtime. 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.

Thank you for the answer.

Just to clarify on your last note: we are not going to change a node's DC or rack configuration. First, we change the snitch and wait for the cluster starts successfully, as you said. Then for some nodes we will perform (one by one):

  • decommission the node, erase it and re-join the cluster with correct rack and datacenter (just like it's described in the docs)
0 Likes 0 ·

Decommissioning and re-adding nodes to a cluster is a completely different operation to switching snitches and are completely unrelated. Cheers!

1 Like 1 ·