I’m having troubles understanding the replication factor in Cassandra.
In the documentation it says that: “The total number of replicas across the cluster is often referred to as the replication factor”.
On the other hand, in the same documentation, it says that “NetworkTopologyStrategy allows you to specify how many replicas you want in each data center”.
So, if i have 2 datacenters with NetworkTopologyStrategy, a replication factor of 2 means i’ll have 2 replicas per data center or 2 replicas overall in the cluster?
Thank you.
When using the NetworkTopologyStrategy, you specify your replication factor on a per-data-center basis using
strategy_options:{data-center-name}={rep-factor-value}rather than the globalstrategy_options:replication_factor={rep-factor-value}.Here’s a concrete example adapted from http://www.datastax.com/docs/1.0/references/cql/CREATE_KEYSPACE
In that example, any given column would be stored on 4 nodes total, with 2 in each data center.