Question

Lets say Cassandra Cluster configuration is setup in a below way

  1. Two nodes(1,2) are in Data Center - A
  2. Two nodes(3,4) are in Data Center - B

and the ring (1,2,3,4) is spawn across data centers located in different places

Lets assume the connection between Data Center A and Data Center - B is broken.

In this situation how the system will behave ? As 1 and 2 are in single data center they believe 3 and 4 are down. on the same way 3 and 4 will treat 1 and 2 are down.I may be completely wrong.

Was it helpful?

Solution

If the 'write' request was sent to 'A' it will handle it and when the connection between A and B is reestablished it will sync the data between the nodes.

That's why the replication is so good in Cassandra, if a node is down, it will do the job with the rest of the nodes.

OTHER TIPS

Depending on the replication factor / snitch / consistency your writes will either fail as it can't achieve the required consistency or succeed and repair its self when the connection comes back up as the coordinator will keep the hints and send them to the other DC later. If the connection is down for too long then these are dropped and you'll need to run a repair.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top