Suppose I have a cluster named 'Test' and have three datacenters DC1,DC2,DC3 in a ring. Each data center has 4 nodes. I do a write to a node with replication=2 depending on the partitioner it places the data in the datacenter. Where will the replication be placed when using NetworkTopologyStrategy. Will the strategy moves clockwise in datacenter and then move to next datacenter? can i get a complete explanation of this with an example
1 Answers
For simplicity, let's use a 2-DC example instead of 3. Yes this diagram shows classic nodes, not vnodes, from http://www.datastax.com/docs/1.0/cluster_architecture/replication. NetworkTopologyStrategy moves clockwise, placing replicas spanning two data centers, each with a replication factor of 2.

LOCAL_QUORUM consistency allows the write operation to the second data center to be asynchronous. The operation can be marked successful in the first data center – the data center local to the origin of the write – and Cassandra can serve read operations on that data without any delay from inter-data center latency. See also, http://www.datastax.com/dev/blog/deploying-cassandra-across-multiple-data-centers. These docs are dated, but explain classic replication. Supplement this info with updates, such as GossipingPropertyFileSnitch, from docs that match your version.