With CL=TWO it appears that one node randomly picks the node from other datacenter to get the data. i.e. one node in the datacenter consistently underperforms.

On Mon, Jun 3, 2013 at 3:21 PM, Hiller, Dean <Dean.Hiller@nrel.gov> wrote:
What happens when you use CL=TWO.


From: srmore <comomore@gmail.com<mailto:comomore@gmail.com>>
Reply-To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" <user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Date: Monday, June 3, 2013 2:09 PM
To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" <user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Subject: Consistency level for multi-datacenter setup

I am a bit confused when using the consistency level for multi datacenter setup. Following is my setup:

I have 4 nodes the way these are set up are
Node 1 DC 1 - N1DC1
Node 2 DC 1 - N2DC1

Node 1 DC 2 - N1DC2
Node 2 DC 2 - N2DC2

I setup a delay in between two datacenters (DC1 and DC2 around 1 sec one way)

I am observing that when I use consistency level 2 for some reason the coordinate node is picking up the nodes from other datacenter. My understanding was that Cassandra picks up nodes which are close by (from local datacenter), determined by Gossip but looks like that's not the case.

I found the following comment on Datastax website :

"If using a consistency level of ONE or LOCAL_QUORUM, only the nodes in the same data center as the coordinator node must respond to the client request in order for the request to succeed."

Does this mean that for multi datacenter we can only use ONE or LOCAL_QUORUM if we want to use the local datacenter to avoid cross datacenter latency.

I am using the GossipingPropertyFileSnitch.

Thanks !