1

Is it possible to do Cassandra data replication into another server instance to run read only data operations on it? As we have explored SAN and it become more hardware expensive

Note: I am not allowed to copy data into file and therefore. It should be like mirroring of data.

Bigby
  • 321
  • 5
  • 16
Sathish
  • 69
  • 8

1 Answers1

1

You can use Cassandras internal replication for this. Use NetworkTopologyAwarePolicy and configure a second datacenter where data will be replicated to (can be lower than your production cluster). Then use this datacenter for your read-only workload and the other one for production.

Your application needs to be reconfigured to use LOCAL_QUORUM or another LOCAL consistency level so the second datacenter isn't used for requests.

This technique is uses for separating resource demanding analytic workloads from the rest for example.

Mandraenke
  • 3,086
  • 1
  • 13
  • 26
  • You mean NetworkTopologyStategy ? If so, in NetworkTopologyStategy both data centers will be in sync and they have same set of data and able to serve independently? Among two, one can be a read only datacenter ? Will this work for already created keyspaces ?? – Sathish Jan 19 '18 at 20:40
  • Both DC will be in sync and have the same data (correctly configured replication set on keyspace). If you use LOCAL_* as consistencly level data will be served from the local DC your session points to. Strictly spoken the other DC can and will handle writes if you do them. "read-only-ness" must be ensured on application side. – Mandraenke Jan 20 '18 at 19:01
  • Thank you very much!! I do not want to handle read only at application side. Do you aware of any open source/paid tools that will take care of read only replication? – Sathish Jan 21 '18 at 20:15
  • If you can go with a different user: https://www.datastax.com/dev/blog/role-based-access-control-in-cassandra and a user with only `SELECT` permission. – Mandraenke Jan 22 '18 at 06:01