Why does data become inaccessible on Cassandra when it is scaled out with replication factor 1

Viewed 22

I was experimenting a scale out operation with Cassandra, and noticed that the data becomes inaccessible (disappears from client PoV) when you horizontally scale with replication factor (RF) set to 1.

Before scale out:

  • 2 nodes cluster (1 seed + 1 non-seed)
  • replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}

After scale out:

  • 4 nodes cluster (3 seeds + 1 non-seed)
  • replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}

In both cases, I tried writing/reading data using cqlsh with CONSISTENCY ONE.

Also checked the backup data, and written data actually still exists after scale out i.e. it is not a data loss. Setting RF=3 somehow made the data available again.

I understand that this is not an ideal setup anyway but why can't cqlsh read an existing replica?

Version info in case it matters: [cqlsh 5.0.1 | Cassandra 3.11.6 | CQL spec 3.4.4 | Native protocol v4]

0 Answers
Related