You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Rahul Neelakantan <ra...@rahul.be> on 2014/07/30 00:15:21 UTC
Measuring WAN replication latency
Does anyone know of a way to measure/monitor WAN replication latency for Cassandra? For example I make a write to DC 1 of a multi DC setup using local_quorum , how long before that write is available for a read either locally in DC1 or remotely in DC2 using local_quorum.
Rahul Neelakantan
Re: Measuring WAN replication latency
Posted by Jeremy Jongsma <je...@barchart.com>.
The brute force way would be:
1) Make client connections to a node in each datacenter from your
monitoring tool.
2) Periodically write a row to one datacenter (at whatever consistency
level your application typically uses.)
3) Immediately query the other datacenter nodes for the same row key with
LOCAL_QUORUM consistency. If not found, execute query again immediately in
a loop.
4) Once the row is available, record time since initial write for that
datacenter.
DataStax folks: this actually seems like a useful metric for something
OpsCenter to track, since it is already doing active statistics collection.
On Wed, Jul 30, 2014 at 8:59 AM, Rahul Neelakantan <ra...@rahul.be> wrote:
> Rob,
> Any ideas you can provide on how to do this will be appreciated, we would
> like to build a latency monitoring tool/dashboard that shows how long it
> takes for data to get sent across various DCs.
>
> Rahul Neelakantan
>
> On Jul 29, 2014, at 8:53 PM, Robert Coli <rc...@eventbrite.com> wrote:
>
> On Tue, Jul 29, 2014 at 3:15 PM, Rahul Neelakantan <ra...@rahul.be> wrote:
>
>> Does anyone know of a way to measure/monitor WAN replication latency for
>> Cassandra?
>
>
> No. [1]
>
> =Rob
>
> [1] There are ways to do something like this task, but you probably don't
> actually want to do them. Trying to do them suggests that you are relying
> on WAN replication timing for your application, which is something you
> almost certainly do not want to do. Why do you believe you have this
> requirement?
>
>
Re: Measuring WAN replication latency
Posted by Rahul Neelakantan <ra...@rahul.be>.
Agreed... This is what we are trying right now.
Rahul Neelakantan
> On Jul 30, 2014, at 1:43 PM, Jeremy Jongsma <je...@barchart.com> wrote:
>
> Yes, the results should definitely not be relied on as a future performance indicator for key app functionality. but knowing roughly what your current replication latency is (and whether it's outside of the normal average) can inform client failover policies, debug data consistency issues, warn of datacenter link congestion, etc.
>
>
>> On Wed, Jul 30, 2014 at 12:02 PM, Robert Coli <rc...@eventbrite.com> wrote:
>>> On Wed, Jul 30, 2014 at 6:59 AM, Rahul Neelakantan <ra...@rahul.be> wrote:
>>
>>> Any ideas you can provide on how to do this will be appreciated, we would like to build a latency monitoring tool/dashboard that shows how long it takes for data to get sent across various DCs.
>>
>> The brute force method described downthread by Jeremy Jongsma gives you something like the monitoring you're looking for, but I continue to believe it's probably a bad idea to try to design a system in this way.
>>
>> =Rob
>
Re: Measuring WAN replication latency
Posted by Jeremy Jongsma <je...@barchart.com>.
Yes, the results should definitely not be relied on as a future performance
indicator for key app functionality. but knowing roughly what your current
replication latency is (and whether it's outside of the normal average) can
inform client failover policies, debug data consistency issues, warn of
datacenter link congestion, etc.
On Wed, Jul 30, 2014 at 12:02 PM, Robert Coli <rc...@eventbrite.com> wrote:
> On Wed, Jul 30, 2014 at 6:59 AM, Rahul Neelakantan <ra...@rahul.be> wrote:
>
>> Any ideas you can provide on how to do this will be appreciated, we would
>> like to build a latency monitoring tool/dashboard that shows how long it
>> takes for data to get sent across various DCs.
>>
>
> The brute force method described downthread by Jeremy Jongsma gives you
> something like the monitoring you're looking for, but I continue to believe
> it's probably a bad idea to try to design a system in this way.
>
> =Rob
>
>
Re: Measuring WAN replication latency
Posted by Robert Coli <rc...@eventbrite.com>.
On Wed, Jul 30, 2014 at 6:59 AM, Rahul Neelakantan <ra...@rahul.be> wrote:
> Any ideas you can provide on how to do this will be appreciated, we would
> like to build a latency monitoring tool/dashboard that shows how long it
> takes for data to get sent across various DCs.
>
The brute force method described downthread by Jeremy Jongsma gives you
something like the monitoring you're looking for, but I continue to believe
it's probably a bad idea to try to design a system in this way.
=Rob
Re: Measuring WAN replication latency
Posted by Rahul Neelakantan <ra...@rahul.be>.
Rob,
Any ideas you can provide on how to do this will be appreciated, we would like to build a latency monitoring tool/dashboard that shows how long it takes for data to get sent across various DCs.
Rahul Neelakantan
> On Jul 29, 2014, at 8:53 PM, Robert Coli <rc...@eventbrite.com> wrote:
>
>> On Tue, Jul 29, 2014 at 3:15 PM, Rahul Neelakantan <ra...@rahul.be> wrote:
>> Does anyone know of a way to measure/monitor WAN replication latency for Cassandra?
>
> No. [1]
>
> =Rob
>
> [1] There are ways to do something like this task, but you probably don't actually want to do them. Trying to do them suggests that you are relying on WAN replication timing for your application, which is something you almost certainly do not want to do. Why do you believe you have this requirement?
Re: Measuring WAN replication latency
Posted by Rahul Neelakantan <ra...@rahul.be>.
Here is the use case ... The Cassandra ring is going to span 6 data centers. The client can write in any data center (the client is also in 6 DCs) and turn back around and read from any other data center for this I assume you will tell me to use each quorum for the writes, however that is going to increase the time it takes for writes to be acknowledged.
What I am looking for is a way to monitor either using some statistic exposed by Cassandra or using some sort of synthetic transaction of how my Cassandra replication looks and alert if there is slowness noticed.
Rahul Neelakantan
> On Jul 29, 2014, at 8:53 PM, Robert Coli <rc...@eventbrite.com> wrote:
>
>> On Tue, Jul 29, 2014 at 3:15 PM, Rahul Neelakantan <ra...@rahul.be> wrote:
>> Does anyone know of a way to measure/monitor WAN replication latency for Cassandra?
>
> No. [1]
>
> =Rob
>
> [1] There are ways to do something like this task, but you probably don't actually want to do them. Trying to do them suggests that you are relying on WAN replication timing for your application, which is something you almost certainly do not want to do. Why do you believe you have this requirement?
Re: Measuring WAN replication latency
Posted by "Laing, Michael" <mi...@nytimes.com>.
I saw this awhile back:
With requests possibly coming in from either US region, we need to make
> sure that the replication of data happens within an acceptable time
> threshold. This lead us to perform an experiment where we wrote 1 million
> records in one region of a multi-region cluster. We then initiated a read,
> 500ms later, in the other region, of the records that were just written in
> the initial region, while keeping a production level of load on the
> cluster. All records were successfully read.
from
http://techblog.netflix.com/2013/12/active-active-for-multi-regional.html
On Tue, Jul 29, 2014 at 5:53 PM, Robert Coli <rc...@eventbrite.com> wrote:
> On Tue, Jul 29, 2014 at 3:15 PM, Rahul Neelakantan <ra...@rahul.be> wrote:
>
>> Does anyone know of a way to measure/monitor WAN replication latency for
>> Cassandra?
>
>
> No. [1]
>
> =Rob
>
> [1] There are ways to do something like this task, but you probably don't
> actually want to do them. Trying to do them suggests that you are relying
> on WAN replication timing for your application, which is something you
> almost certainly do not want to do. Why do you believe you have this
> requirement?
>
Re: Measuring WAN replication latency
Posted by Robert Coli <rc...@eventbrite.com>.
On Tue, Jul 29, 2014 at 3:15 PM, Rahul Neelakantan <ra...@rahul.be> wrote:
> Does anyone know of a way to measure/monitor WAN replication latency for
> Cassandra?
No. [1]
=Rob
[1] There are ways to do something like this task, but you probably don't
actually want to do them. Trying to do them suggests that you are relying
on WAN replication timing for your application, which is something you
almost certainly do not want to do. Why do you believe you have this
requirement?