You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Selva Kumar <ww...@yahoo.com> on 2011/06/15 03:44:00 UTC
Multi data center configuration - A question on read correction
I have setup a multiple data center configuration in Cassandra. My primary
intention is to minimize the network traffic between DC1 and DC2. Want DC1 read
requests be served with out reaching DC2 nodes. After going through
documentation, i felt following setup would do.
Replica Placement Strategy: NetworkTopologyStrategy
Replication Factor: 3
strategy_options:
DC1 : 2
DC2 : 1
endpoint_snitch: org.apache.cassandra.locator.PropertyFileSnitch
Read Consistency Level: LOCAL_QUORUM
Write Consistency Level: LOCAL_QUORUM
File: cassandra-topology.properties
# Cassandra Node IP=Data Center:Rack
10.10.10.149=DC1:RAC1
10.10.10.150=DC1:RAC1
10.10.10.151=DC1:RAC1
10.20.10.153=DC2:RAC1
10.20.10.154=DC2:RAC1
# default for unknown nodes
default=DC1:RAC1
Question I have:
1. Created a java program to test. It was querying with consistency level
LOCAL_QUORUM on a DC1 node. Read count(Through cfstats) on the DC2 node showed
read happened there too. Is it because of read correction?. Is there way to
avoid doing read correction in DC2 nodes, when we query DC1 nodes.
Thanks
Selva
Re: Multi data center configuration - A question on read correction
Posted by Sylvain Lebresne <sy...@datastax.com>.
Yes, that's the way to do it.
On Wed, Jun 15, 2011 at 9:43 PM, Selva Kumar <ww...@yahoo.com> wrote:
> Thanks Jonathan. Can we turn off RR by READ_REPAIR_CHANCE.= 0. Please
> advice.
>
> Selva
>
> ________________________________
> From: Jonathan Ellis <jb...@gmail.com>
> To: user@cassandra.apache.org
> Sent: Tue, June 14, 2011 8:59:41 PM
> Subject: Re: Multi data center configuration - A question on read correction
>
> That's just read repair sending MD5s of the data for comparison. So
> net traffic is light.
>
> You can turn off RR but the downsides can be large. Turning it down
> to say 10% can be reasonable tho.
>
> But again, if network traffic is your concern you should be fine.
>
> On Tue, Jun 14, 2011 at 8:44 PM, Selva Kumar <ww...@yahoo.com> wrote:
>> I have setup a multiple data center configuration in Cassandra. My primary
>> intention is to minimize the network traffic between DC1 and DC2. Want DC1
>> read requests be served with out reaching DC2 nodes. After going through
>> documentation, i felt following setup would do.
>>
>>
>> Replica Placement Strategy: NetworkTopologyStrategy
>> Replication Factor: 3
>> strategy_options:
>> DC1 : 2
>> DC2 : 1
>> endpoint_snitch: org.apache.cassandra.locator.PropertyFileSnitch
>> Read Consistency Level: LOCAL_QUORUM
>> Write Consistency Level: LOCAL_QUORUM
>>
>> File: cassandra-topology.properties
>> # Cassandra Node IP=Data Center:Rack
>> 10.10.10.149=DC1:RAC1
>> 10.10.10.150=DC1:RAC1
>> 10.10.10.151=DC1:RAC1
>>
>> 10.20.10.153=DC2:RAC1
>> 10.20.10.154=DC2:RAC1
>> # default for unknown nodes
>> default=DC1:RAC1
>>
>> Question I have:
>> 1. Created a java program to test. It was querying with consistency level
>> LOCAL_QUORUM on a DC1 node. Read count(Through cfstats) on the DC2 node
>> showed read happened there too. Is it because of read correction?. Is
>> there
>> way to avoid doing read correction in DC2 nodes, when we query DC1 nodes.
>>
>> Thanks
>> Selva
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>
Re: Multi data center configuration - A question on read correction
Posted by Selva Kumar <ww...@yahoo.com>.
Thanks Jonathan. Can we turn off RR by READ_REPAIR_CHANCE.= 0. Please advice.
Selva
________________________________
From: Jonathan Ellis <jb...@gmail.com>
To: user@cassandra.apache.org
Sent: Tue, June 14, 2011 8:59:41 PM
Subject: Re: Multi data center configuration - A question on read correction
That's just read repair sending MD5s of the data for comparison. So
net traffic is light.
You can turn off RR but the downsides can be large. Turning it down
to say 10% can be reasonable tho.
But again, if network traffic is your concern you should be fine.
On Tue, Jun 14, 2011 at 8:44 PM, Selva Kumar <ww...@yahoo.com> wrote:
> I have setup a multiple data center configuration in Cassandra. My primary
> intention is to minimize the network traffic between DC1 and DC2. Want DC1
> read requests be served with out reaching DC2 nodes. After going through
> documentation, i felt following setup would do.
>
>
> Replica Placement Strategy: NetworkTopologyStrategy
> Replication Factor: 3
> strategy_options:
> DC1 : 2
> DC2 : 1
> endpoint_snitch: org.apache.cassandra.locator.PropertyFileSnitch
> Read Consistency Level: LOCAL_QUORUM
> Write Consistency Level: LOCAL_QUORUM
>
> File: cassandra-topology.properties
> # Cassandra Node IP=Data Center:Rack
> 10.10.10.149=DC1:RAC1
> 10.10.10.150=DC1:RAC1
> 10.10.10.151=DC1:RAC1
>
> 10.20.10.153=DC2:RAC1
> 10.20.10.154=DC2:RAC1
> # default for unknown nodes
> default=DC1:RAC1
>
> Question I have:
> 1. Created a java program to test. It was querying with consistency level
> LOCAL_QUORUM on a DC1 node. Read count(Through cfstats) on the DC2 node
> showed read happened there too. Is it because of read correction?. Is there
> way to avoid doing read correction in DC2 nodes, when we query DC1 nodes.
>
> Thanks
> Selva
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com
Re: Multi data center configuration - A question on read correction
Posted by Jonathan Ellis <jb...@gmail.com>.
That's just read repair sending MD5s of the data for comparison. So
net traffic is light.
You can turn off RR but the downsides can be large. Turning it down
to say 10% can be reasonable tho.
But again, if network traffic is your concern you should be fine.
On Tue, Jun 14, 2011 at 8:44 PM, Selva Kumar <ww...@yahoo.com> wrote:
> I have setup a multiple data center configuration in Cassandra. My primary
> intention is to minimize the network traffic between DC1 and DC2. Want DC1
> read requests be served with out reaching DC2 nodes. After going through
> documentation, i felt following setup would do.
>
>
> Replica Placement Strategy: NetworkTopologyStrategy
> Replication Factor: 3
> strategy_options:
> DC1 : 2
> DC2 : 1
> endpoint_snitch: org.apache.cassandra.locator.PropertyFileSnitch
> Read Consistency Level: LOCAL_QUORUM
> Write Consistency Level: LOCAL_QUORUM
>
> File: cassandra-topology.properties
> # Cassandra Node IP=Data Center:Rack
> 10.10.10.149=DC1:RAC1
> 10.10.10.150=DC1:RAC1
> 10.10.10.151=DC1:RAC1
>
> 10.20.10.153=DC2:RAC1
> 10.20.10.154=DC2:RAC1
> # default for unknown nodes
> default=DC1:RAC1
>
> Question I have:
> 1. Created a java program to test. It was querying with consistency level
> LOCAL_QUORUM on a DC1 node. Read count(Through cfstats) on the DC2 node
> showed read happened there too. Is it because of read correction?. Is there
> way to avoid doing read correction in DC2 nodes, when we query DC1 nodes.
>
> Thanks
> Selva
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com