Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A5ECA785F for ; Mon, 7 Nov 2011 13:04:46 +0000 (UTC) Received: (qmail 5364 invoked by uid 500); 7 Nov 2011 13:04:44 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 5299 invoked by uid 500); 7 Nov 2011 13:04:44 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 5291 invoked by uid 99); 7 Nov 2011 13:04:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Nov 2011 13:04:44 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rkalla@gmail.com designates 209.85.161.172 as permitted sender) Received: from [209.85.161.172] (HELO mail-gx0-f172.google.com) (209.85.161.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Nov 2011 13:04:38 +0000 Received: by ggnv1 with SMTP id v1so6166213ggn.31 for ; Mon, 07 Nov 2011 05:04:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=TuNZwuqGGyA2wB+1z7VRlHRaEQirmrN1k8y2kpHVvJg=; b=bK7iCODRI9XKprjxWy3dUWmAsmx+h7snl2R7Z1n9SqlF9qH/b8ftSqYaTHQzntvyPB BNXkRQJ3zgiPpv4j2NJiTOW/bTqmujptGk+4yjb1F24A8Q99PVoNFYMnPTw540qElUAT NOgkSNAYG/GLSl9+SWOPWx8lOSapAZK1IKEeY= Received: by 10.236.75.167 with SMTP id z27mr34360000yhd.53.1320671058154; Mon, 07 Nov 2011 05:04:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.147.169.19 with HTTP; Mon, 7 Nov 2011 05:03:47 -0800 (PST) In-Reply-To: <477F356C-DD18-46DC-8463-EF278DE9C97B@gmail.com> References: <60E014B3-4010-4987-BD42-CA4242675BB7@gmail.com> <1320646450.33642.YahooMailNeo@web95202.mail.in2.yahoo.com> <477F356C-DD18-46DC-8463-EF278DE9C97B@gmail.com> From: Riyad Kalla Date: Mon, 7 Nov 2011 06:03:47 -0700 Message-ID: Subject: Re: Will writes with < ALL consistency eventually propagate? To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=20cf3005dde649534404b124b1e1 --20cf3005dde649534404b124b1e1 Content-Type: text/plain; charset=ISO-8859-1 Ah! Ok I was interpreting what you were saying to mean that if my RF was too high, then the ring would die if I lost one. Ultimately what I want (I think) is: Replication Factor: 5 (aka "all of my nodes") Consistency Level: 2 Put another way, when I write a value, I want it to exist on two servers *at least* before I consider that write "successful" enough for my code to continue, but in the background I would like Cassandra to keep copying that value around at its leisure until all the ring nodes know about it. This sounds like what I need. Thanks for pointing me in the right direction. Best, Riyad On Mon, Nov 7, 2011 at 5:47 AM, Anthony Ikeda wrote: > Riyad, I'm also just getting to know the different settings and values > myself :) > > I believe, and it also depends on your config, CL.ONE Should ignore the > loss of a node if your RF is 5, once you increase the CL then if you lose a > node the CL is not met and you will get exceptions returned. > > Sent from my iPhone > > On 07/11/2011, at 4:32, Riyad Kalla wrote: > > Anthony and Jaydeep, thank you for weighing in. I am glad to see that they > are two different values (makes more sense mentally to me). > > Anthony, what you said caught my attention "to ensure all nodes have a > copy you may not be able to survive the loss of a single node." -- why > would this be the case? > > I assumed (incorrectly?) that a node would simply disappear off the map > until I could bring it back up again, at which point all the missing values > that it didn't get while it was done, it would slowly retrieve from other > members of the ring. Is this the wrong understanding? > > If forcing a replication factor equal to the number of nodes in my ring > will cause a hard-stop when one ring goes down (as I understood your > comment to mean), it seems to me I should go with a much lower replication > factor... something along the lines of 3 or roughly ceiling(N / 2) and just > deal with the latency when one of the nodes has to route a request to > another server when it doesn't contain the value. > > Is there a better way to accomplish what I want, or is keeping the > replication factor that aggressively high generally a bad thing and using > Cassandra in the "wrong" way? > > Thank you for the help. > > -Riyad > > On Sun, Nov 6, 2011 at 11:14 PM, chovatia jaydeep < > chovatia_jaydeep@yahoo.co.in> wrote: > >> Hi Riyad, >> >> You can set replication = 5 (number of replicas) and write with CL = ONE. >> There is no hard requirement from Cassandra to write with CL=ALL to >> replicate the data unless you need it. Considering your example, If you >> write with CL=ONE then also it will replicate your data to all 5 replicas >> eventually. >> >> Thank you, >> Jaydeep >> ------------------------------ >> *From:* Riyad Kalla >> *To:* "user@cassandra.apache.org" >> *Sent:* Sunday, 6 November 2011 9:50 PM >> *Subject:* Will writes with < ALL consistency eventually propagate? >> >> I am new to Cassandra and was curious about the following scenario... >> >> Lets say i have a ring of 5 servers. Ultimately I would like each server >> to be a full replication of the next (master-master-*). >> >> In a presentation i watched today on Cassandra, the presenter mentioned >> that the ring members will shard data and route your requests to the right >> host when they come in to a server that doesnt physically contain the value >> you wanted. To the client requesting this is seamless excwpt for the added >> latency. >> >> If i wanted to avoid the routing and latency and ensure every server had >> the full data set, do i have to write with a consistency level of ALL and >> wait for all of those writes to return in my code, or can i write with a CL >> of 1 or 2 and let the ring propagate the rest of the copies to the other >> servers in the background after my code has continued executing? >> >> I dont mind eventual consistency in my case, but i do (eventually) want >> all nodes to have all values and cannot tell if this is default behavior, >> or if sharding is the default and i can only force duplicates onto the >> other servers explicitly with a CL of ALL. >> >> Best, >> Riyad >> >> > --20cf3005dde649534404b124b1e1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Ah! Ok I was interpreting what you were saying to mean that if my RF was to= o high, then the ring would die if I lost one.

Ultimatel= y what I want (I think) is:

Replication Factor: 5 = (aka "all of my nodes")
Consistency Level: 2

Put another way, when I = write a value, I want it to exist on two servers *at least* before I consid= er that write "successful" enough for my code to continue, but in= the background I would like Cassandra to keep copying that value around at= its=A0leisure until all the ring nodes know about it.

This sounds like what I need. Thanks for pointing me in= the right direction.

Best,
Riyad=A0
=
On Mon, Nov 7, 2011 at 5:47 AM, Anthony Iked= a <anth= ony.ikeda.dev@gmail.com> wrote:
Riyad, I'= m also just getting to know the different settings=A0and = values myself :)

I believe, and it also depends on your config, CL.ONE Should ignore the l= oss of a node if your RF is 5, once you increase the CL then if you lose a = node the CL is not met and you will get exceptio= ns returned.=A0

Sent from my iPhone

On 07/11/= 2011, at 4:32, Riyad Kalla <rkalla@gmail.com> wrote:

Anthony and Jaydeep, thank you for weighing in. I am glad to see that = they are two different values (makes more sense mentally to me).

Anthony, what you said caught my attention "to ensure= all nodes have a copy you may not be able to survive the loss of a single = node." -- why would this be the case?

I assumed (incorrectl= y?) that a node would simply disappear off the map until I could bring it b= ack up again, at which point all the missing values that it didn't get = while it was done, it would slowly retrieve from other members of the ring.= Is this the wrong understanding?

If forcing a replicat= ion factor equal to the number of nodes in my ring will cause a hard-stop w= hen one ring goes down (as I understood your comment to mean), it seems to = me I should go with a much lower replication factor... something along the = lines of 3 or roughly ceiling(N / 2) and just deal with the latency when on= e of the nodes has to route a request to another server when it doesn't= contain the value.

Is there a better way= to accomplish what I want, or is keeping the replication factor that aggre= ssively high generally a bad thing and using Cassandra in the "wrong&q= uot; way?

Thank you for the hel= p.

-Riyad=

On Sun, Nov 6, 2011 at 11:14 PM, = chovatia jaydeep <chovatia_jaydeep@yahoo.co.in> w= rote:
Hi Riyad,

You can set replication =3D 5 (numbe= r of replicas) and write with CL =3D ONE. There is no hard requirement from= Cassandra to write with CL=3DALL to replicate the data unless you need it.= Considering your example, If you write with CL=3DONE then also it will rep= licate your data to all 5 replicas eventually.

Thank you,
Jaydeep

From: Riyad Kalla <rkalla@gmail.com>
To: "user@cassandra.apache.org" <user@ca= ssandra.apache.org>
Sent: Sunday, 6 November 2011 9:50 PM
Subject: Will writes with < ALL consistency eventually pr= opagate?

I am new to Cassandra and was curious about the follow= ing scenario...

Lets say i have a ring of 5 servers. Ultimately I wo= uld like each server to be a full replication of the next (master-master-*)= .

In a presentation i watched today on Cassandra, the presenter mentioned= that the ring members will shard data and route your requests to the right= host when they come in to a server that doesnt physically contain the valu= e you wanted. To the client requesting this is seamless excwpt for the adde= d latency.

If i wanted to avoid the routing and latency and ensure every server ha= d the full data set, do i have to write with a consistency level of ALL and= wait for all of those writes to return in my code, or can i write with a CL of 1 or 2 and let the ring pro= pagate the rest of the copies to the other servers in the background after = my code has continued executing?

I dont mind eventual consistency in= my case, but i do (eventually) want all nodes to have all values and canno= t tell if this is default behavior, or if sharding is the default and i can= only force duplicates onto the other servers explicitly with a CL of ALL.<= br>
Best,
Riyad

=


--20cf3005dde649534404b124b1e1--