You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Dean Hiller <de...@alvazan.com> on 2011/07/22 22:57:23 UTC
question on setup for writes into 2 datacenters
Ideally, we would want to have a replication factor of 4, and a minimum
write consistency of 2 (which looking at the default in cassandra.yaml is to
memory first with asynch to disk...perfect so far!!!)
Now, obviously, I can get the partitioner setup to make sure I get 2
replicas in each data center. The next thing I would want to guarantee
however is that if a write came into datacenter 1, it would write to the two
nodes in datacenter 1 and asynchronously replicate to datacenter 2. Is this
possible? Does cassandra already handle that or is there something I could
do to get cassandra to do that?
In this mode, I believe I can have both datacenters be live as well as be
backup for the other not wasting resources.
thanks,
Dean
Re: question on setup for writes into 2 datacenters
Posted by Dean Hiller <de...@alvazan.com>.
thanks this is perfect...yeah, we want 4 nodes(2 in each data center) so
just a bit more than 3 ;) so we can have both datacenters be active at the
same time and not have to write to the other datacenter except in the
background. This is perfect......hbase couldn't do this which I wanted
badly along with the in-memory write and write to disk in the background.
thanks!!!!
Dean
On Sun, Jul 24, 2011 at 4:40 PM, aaron morton <aa...@thelastpickle.com>wrote:
> Quick reminder, with RF == 2 the QUORUM is 2 as well. So when using
> LOCAL_QUORUM with RF 2+2 you will effectively be using LOCAL_ALL which may
> not be what you want. As De La Soul sang, 3 is the magic number for minimum
> fault tolerance (QUORUM is then 2).
>
> Cheers
>
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 23 Jul 2011, at 10:04, Sameer Farooqui wrote:
>
> It sounds like what you're looking for is write consistency of
> local_quorum:
> http://www.datastax.com/docs/0.8/consistency/index#write-consistency
>
> local_quorum would mean the write has to be successful on a majority of
> nodes in DC1 (so 2) before it is considered successful.
>
> If you use just quorum write, it'll have to be committed to 3 replicas out
> of the 4 before it's considered successful.
>
>
>
>
> On Fri, Jul 22, 2011 at 1:57 PM, Dean Hiller <de...@alvazan.com> wrote:
>
>> Ideally, we would want to have a replication factor of 4, and a minimum
>> write consistency of 2 (which looking at the default in cassandra.yaml is to
>> memory first with asynch to disk...perfect so far!!!)
>>
>> Now, obviously, I can get the partitioner setup to make sure I get 2
>> replicas in each data center. The next thing I would want to guarantee
>> however is that if a write came into datacenter 1, it would write to the two
>> nodes in datacenter 1 and asynchronously replicate to datacenter 2. Is this
>> possible? Does cassandra already handle that or is there something I could
>> do to get cassandra to do that?
>>
>> In this mode, I believe I can have both datacenters be live as well as be
>> backup for the other not wasting resources.
>>
>> thanks,
>> Dean
>>
>
>
>
Re: question on setup for writes into 2 datacenters
Posted by aaron morton <aa...@thelastpickle.com>.
Quick reminder, with RF == 2 the QUORUM is 2 as well. So when using LOCAL_QUORUM with RF 2+2 you will effectively be using LOCAL_ALL which may not be what you want. As De La Soul sang, 3 is the magic number for minimum fault tolerance (QUORUM is then 2).
Cheers
-----------------
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com
On 23 Jul 2011, at 10:04, Sameer Farooqui wrote:
> It sounds like what you're looking for is write consistency of local_quorum:
> http://www.datastax.com/docs/0.8/consistency/index#write-consistency
>
> local_quorum would mean the write has to be successful on a majority of nodes in DC1 (so 2) before it is considered successful.
>
> If you use just quorum write, it'll have to be committed to 3 replicas out of the 4 before it's considered successful.
>
>
>
>
> On Fri, Jul 22, 2011 at 1:57 PM, Dean Hiller <de...@alvazan.com> wrote:
> Ideally, we would want to have a replication factor of 4, and a minimum write consistency of 2 (which looking at the default in cassandra.yaml is to memory first with asynch to disk...perfect so far!!!)
>
> Now, obviously, I can get the partitioner setup to make sure I get 2 replicas in each data center. The next thing I would want to guarantee however is that if a write came into datacenter 1, it would write to the two nodes in datacenter 1 and asynchronously replicate to datacenter 2. Is this possible? Does cassandra already handle that or is there something I could do to get cassandra to do that?
>
> In this mode, I believe I can have both datacenters be live as well as be backup for the other not wasting resources.
>
> thanks,
> Dean
>
Re: question on setup for writes into 2 datacenters
Posted by Sameer Farooqui <ca...@gmail.com>.
It sounds like what you're looking for is write consistency of local_quorum:
http://www.datastax.com/docs/0.8/consistency/index#write-consistency
local_quorum would mean the write has to be successful on a majority of
nodes in DC1 (so 2) before it is considered successful.
If you use just quorum write, it'll have to be committed to 3 replicas out
of the 4 before it's considered successful.
On Fri, Jul 22, 2011 at 1:57 PM, Dean Hiller <de...@alvazan.com> wrote:
> Ideally, we would want to have a replication factor of 4, and a minimum
> write consistency of 2 (which looking at the default in cassandra.yaml is to
> memory first with asynch to disk...perfect so far!!!)
>
> Now, obviously, I can get the partitioner setup to make sure I get 2
> replicas in each data center. The next thing I would want to guarantee
> however is that if a write came into datacenter 1, it would write to the two
> nodes in datacenter 1 and asynchronously replicate to datacenter 2. Is this
> possible? Does cassandra already handle that or is there something I could
> do to get cassandra to do that?
>
> In this mode, I believe I can have both datacenters be live as well as be
> backup for the other not wasting resources.
>
> thanks,
> Dean
>