Bertan Gundogdu
Bertan Gundogdu

Reputation: 352

How to update configuration of a Cassandra cluster

I have a 3 node Cassandra cluster and I want to make some adjustments to the cassandra.yaml

My question is, how should I perform this? One node at a time or is there a way to make it happen without shutting down nodes?

Btw, I am using Cassandra 2.2 and this is a production cluster.

Upvotes: 4

Views: 3801

Answers (1)

Mike Lococo
Mike Lococo

Reputation: 684

There are multiple approaches here:

  1. If you edit the cassandra.yaml file, you need to restart cassandra to re-read the contents of that file. If you restart all nodes at once, your cluster will be unavailable. Restarting one node at a time is almost always safe (provided you have sane replication-factors and consistency-levels). If your cluster is configured to survive a rack or datacenter outage, then you can safely restart more nodes concurrently.

  2. Many settings can be changed without a restart via JMX, though I don't have a documentation link handy. Changing via JMX WON'T change cassandra.yml though, so you'll need to update that also or your config will revert back to what's in the file when the node restarts.

  3. If you're using DSE, OpsCenter's Lifecycle Manager feature makes updating configs a simple point-and-click affair (disclaimer, I'm biased as I'm an LCM dev).

Upvotes: 6

Related Questions