1

In data replication, is it correct to claim that the time for replication is the write time on the source server plus the delay between the nodes plus the write time on the target server?

1 Answers1

1

Basically. Thats included in the coordinator read latency if you want to look at that. At least up to the consistency level requested number of replicas.

Chris Lohfink
  • 16,150
  • 1
  • 29
  • 38
  • I have more two questions. How get coordinator read latency? The replication path the same as the write path for consistency greater than one or exists, for example, a trigger on replication path? – Carlos Gomes Oct 11 '18 at 17:45
  • Can see metrics from http://cassandra.apache.org/doc/latest/operating/metrics.html#client-request-metrics or use `nodetool proxyhistograms`. – Chris Lohfink Oct 11 '18 at 17:57
  • When you do a write it will send to all replicas from the coordinator and only return once its met the requested consistency level. The mutation is sent to all replicas from the coordinator. Since cassandra is eventually consistent and built around that, its ok if a node is down or the network becomes unavailable for awhile. Those situations it can be hours or days even before the mutation is delivered. In multi DC environments there are some optimizations, it will send 1 mutation over to a replica in other DC which will then send it out to others to reduce the cross-dc traffic. – Chris Lohfink Oct 11 '18 at 17:59
  • Thank's, How to access org.apache.cassandra.metrics:type=Messaging,name=CrossNodeLatency in cassandra 2.1? – Carlos Gomes Oct 15 '18 at 23:28
  • some alternative for cassandra 2.1? – Carlos Gomes Oct 16 '18 at 20:54
  • i need to measure replication time – Carlos Gomes Oct 16 '18 at 21:08
  • ping is going to give you a close representation but in 2.1 theres no metrics kept in C* to help you directly. You can maybe get an estimate doing queries with different CLs but theres work under covers that will add to it. – Chris Lohfink Oct 16 '18 at 21:56