You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Bill Hastings <bl...@gmail.com> on 2011/12/04 17:22:21 UTC

How does NetworkStrategy work?

If I have a replication factor set up as 3 and I want data replicated
across data centers would I get 3 replicas per DC or is each replica placed
in a different Data centers?

Re: How does NetworkStrategy work?

Posted by Edward Capriolo <ed...@gmail.com>.
On Sun, Dec 4, 2011 at 11:22 AM, Bill Hastings <bl...@gmail.com>wrote:

> If I have a replication factor set up as 3 and I want data replicated
> across data centers would I get 3 replicas per DC or is each replica placed
> in a different Data centers?


The strategy options dictate how many replicas go to each datacenter.

[default@unknown] create keyspace ks33 placement_strategy =
'org.apache.cassandra.locator.NetworkTopologyStrategy' and
strategy_options=[{0:2,1:2}];

This means two copies in datacenter 2 and two copies in datacenter 1.

more information multi-datacenter is here:
http://www.packtpub.com/sites/default/files/5122OS-Chapter-8-Multiple-Datacenter-Deployments.pdf?utm_source=packtpub&utm_medium=free&utm_campaign=pdf