0
votes

Using the cassandra cluster manager, I created a cluster with 4 nodes: node1, node2, node3, node4.

Then I used cqlsh to create a keyspace with replication factor 3.

So I guess there should be 3 replicas of my data somewhere. I was expecting, that, if I create a table there would be 3 "copies" distributed over those 4 nodes

But if I stop node1 I can't access the table at all. I'm getting the message that no host is available.

Where is my error in reasoning? How can I set the replication factor so that my data is actually distributed over more than just one node?

1
If you set a replication factor of 3, there will be a total of three instances stored. (See stackoverflow.com/questions/24587869/…) What's your read consistency set to?Don Branson
Also, can you add the actual error message to you question?Don Branson
if I write CONSISTENCY into cqlsh it says "Current consistency level is one ". The error message says only "NoHostAvailable:"BirnBaumBlüte

1 Answers

2
votes

cqlsh uses a whitelist policy, meaning the client will only connect to the one host. If that 1 host goes down you will get a NoHostAvailable exception and it wont be able to try any of the other nodes. Try connecting cqlsh to a host other than the one you take down or use one of the cassandra drivers with an appropriate load balancing policy.