Asad
Asad

Reputation: 35

Cassandra 2.2.8: routing traffic from a node using GossipingPropertyFileSnitch

I'm repairing a node and compacting large number of sstables - i'm thinking to alleviate load on the cpu/node and want to routing incoming web traffic to other nodes in the cluster.

may you guys please share how i can route internet traffic to other nodes in the cluster so to let the node keep using cpu on the major maintenance work?

thanks in advance

Upvotes: 1

Views: 139

Answers (1)

Chris Lohfink
Chris Lohfink

Reputation: 16400

Providing you have a replication factor and consistency level that can handle a node being down, you can remove the node from the cluster during the compactions

nodetool disablebinary
nodetool disablethrift

This would prevent your client application from sending requests and it acting as coordinator but it will still recieve the mutations from writes so it wont get behind. If you want to reduce load further you can completely remove it with

nodetool disablebinary
nodetool disablethrift
nodetool disablegossip

But make sure you enable gossip again before your max_hint_window_in_ms which is defined in the cassandra.yaml (default 3 hours). If you dont the hints for that node will expire and not be delivered, leading to a consistency issue that will not be resolved without a repair.

Once you reconnect wait for the pending hints and active hints are down to 0 before disabling gossip again. Note: pending will always be +1 since it has a regular scheduled task, so 1 not zero.

Can check the hint thread pool with OpsCenter, nodetool tpstats or via JMX with org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=HintedHandoff,name=PendingTasks and org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=HintedHandoff,name=ActiveTasks

Upvotes: 2

Related Questions