Replication in cassandra

How does replication work in Cassandra? If I have 3 racks and 3 RF s NetworkTopologyStratagy, then will the data be replicated to all 3 racks?

How exactly will data across the entire cluster be replicated? I ask because we are designing our cluster to satisfy the worst case scenario when 2 out of 3 racks go down and we don’t want to lose data.

We have only one data center with 3 racks.

If I use:

CREATE KEYSPACE "myKeyspaceName"
WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'DC1' : 3  }

Will this be repeated in all three racks?

+4
source share
3 answers

Cassandra 1.0 , : Cassandra.

, (?) . , DC , RACK 2 . , :

server1IP=DC1:RACK1
server2IP=DC1:RACK1
server3IP=DC2:RACK1
server4IP=DC2:RACK1
server5IP=DC2:RACK2
server6IP=DC2:RACK2

3 ( ), NetworkTopologyStrategy DC, :

CREATE KEYSPACE "myKeyspaceName"
WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'DC1' : 1, 'DC2' : 2};

PropertyFile " ", , , , node RACK1 DC1, RACK DC2. , , , .

" " , , .

EDIT:

CREATE KEYSPACE "myKeyspaceName" WITH REPLICATION = {'class': 'NetworkTopologyStrategy', replicationfactor: 3}. ?

. , , NetworkTopologyStrategy DC, DC , "replicationfactor". , :

NetworkTopologyStrategy , . ( node) , .

, , DC DC1, :

CREATE KEYSPACE "myKeyspaceName"
WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'DC1' : 3}

, DC, .

+10

. : Datacenters Racks. , , .

, 3 , ( ), . , , 3. 9 .

. , C * .

( ) , . One , , Quorum 1/2 + 1. , NetworkTopologyStrategy, Local_One Local_Quorum (1/2 DC + 1), ,

, , ,

Replication

Consistency

+4

rack-dc, , node , , node.

0

Source: https://habr.com/ru/post/1538074/


All Articles