1
votes

My Architecture is as follows:

Two data centers DC1 and DC2 in my test cluster named Test Cluster1, DC1 has two spark nodes and DC2 has two transactional(data) nodes, that is i have 4 nodes in my cluster.Then my doubt is that is it possible to set a replication factor of 3 to DC1 or DC2.

2

2 Answers

2
votes

No, as RF is set per DC, then you can't RF higher than you have nodes in this particular DC - you need to use NetworkTopologyStrategy as this:

{'class':'NetworkTopologyStrategy', 'DC1':2, 'DC2':2 }
1
votes

Replication factor should be equal or less with the number of nodes present in a data center.as you have 2-2 nodes in each dc, you can set 2 as RF while altering the Keyspace in below manner

cqlsh>ALTER KEYSPACE WITH replication = {'class': 'NetworkTopologyStrategy' , DC1:2, DC2:2};