2

We use a multi-data center (DC) cassandra cluster. During write on to the cluster, I want only LOCAL DC to perform writes on its nodes as we are already routing the write requests to the desired DC only based on the source from where write is initiated. So, I want only LOCAL DC to process the write and no other DC to perform the writes on its nodes. But later on by virtue of replication among nodes across DCs, I want the written data to be replicated across DCs. Is this replication across DCs possible when I am restricting the write to only one DC in the first place.If I do not open connections to REMOTE hosts lying in different DCs during my write operation, is data replication possible amongst DCs later on. Why I definitely need replicas of data in all DCs is because during data read from cluster, we want the data to be read from any DC the read request falls on, not necessarily the LOCAL one.

Do anyone has solution to this?

1

The data is always written to all DCs, the LOCAL consistency levels are just saying that confirmation should come from the local nodes, not from other DCs...

From the DSE Architecture guide (also look to image there):

In multiple datacenter deployments, DataStax Enterprise (DSE) optimizes write performance by choosing one coordinator node. The coordinator node contacted by the client application forwards the write request to one replica in each of the other datacenters, with a special tag to forward the write to the other local replicas.

If the write write consistency levels is LOCAL_ONE or LOCAL_QUORUM, only the nodes in the same datacenter as the coordinator node must respond to the client request for the request to succeed. Use either LOCAL_ONE or LOCAL_QUORUM to reduce geographical latency and lessen the impact on response times of client write requests.

P.S. I recommend to read this guide to understand how Cassandra/DSE works - it makes things much simpler if you have this information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.