How to prevent traffic to/from a slow Cassandra node using Python

Posted by Sergio Ayestarán on Stack Overflow See other posts from Stack Overflow or by Sergio Ayestarán
Published on 2013-07-01T23:04:14Z Indexed on 2013/07/01 23:05 UTC
Read the original article Hit count: 330

Filed under:
|
|

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!

© Stack Overflow or respective owner

Related posts about python

Related posts about cassandra