How to prevent traffic to/from a slow Cassandra node using Python
- by Sergio Ayestarán
Intro:
I have a Python application using a Cassandra 1.2.4 cluster with a replication factor of 3, all reads and writes are done with a consistency level of 2. To access the cluster I use the CQL library. The Cassandra cluster is running on rackspace's virtual servers.
The problem:
From time to time one of the nodes can become slower than usual, in this case I want to be able to detect this situation and prevent making requests to the slow node and if possible to stop using it at all (this should theoretically be possible since the RF is 3 and the CL is 2 for every single request).
The questions:
What's the best way of detecting the slow node from a Python application?
Is there a way to stop using one of the Cassandra nodes from Python in this scenario without human intervention?
Thanks in advance!