4
votes

I am working on multi DC deployment and one thing is not clear to me - this is the rack concept interpretation from Cassandra perspective.

I can enforce replication order by defining proper key ranges. Why do I need to specify racks additionally in cassandra-topology.properties ?

Lets take as example Cassandra documentation: http://www.datastax.com/docs/1.1/cluster_architecture/replication

If I have replication factor 3, and my row key is stored on Node 1, than replicas will be stored on Node 2 and 3 - this is obvious when we look on ring structure, so... why do I need to duplicate this information in rack configuration?

1

1 Answers

8
votes

The rack configuration allows cassandra to optimize replica placement so you have better fault tolerance properties. If you have all your replicas in rack 1, and that rack goes down, you'll lose the data. If you tell Cassandra about your rack configuration it will keep replicas on different racks.