From user-return-22072-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Mon Nov 7 12:48:24 2011 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 4CE0574F8 for ; Mon, 7 Nov 2011 12:48:24 +0000 (UTC) Received: (qmail 89164 invoked by uid 500); 7 Nov 2011 12:48:22 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 89128 invoked by uid 500); 7 Nov 2011 12:48:22 -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 89120 invoked by uid 99); 7 Nov 2011 12:48:22 -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 12:48:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anthony.ikeda.dev@gmail.com designates 209.85.213.44 as permitted sender) Received: from [209.85.213.44] (HELO mail-yw0-f44.google.com) (209.85.213.44) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Nov 2011 12:48:16 +0000 Received: by ywt2 with SMTP id 2so6139183ywt.31 for ; Mon, 07 Nov 2011 04:47:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; bh=fvwHV27sXMC77EV2egXsE049O6PoPwHpGYTHsckVgv0=; b=UcwLNS9x4OzdCRDKDoxoRsEGEvffVXpx+ASGwsXsxsE5Yr/j9IACwr2juN2UDiXsv8 D9iehP1gdBzd8BZiI9MwUQgyDHqM3cG1oEhuz1ds5DXYt7pvtECzAT2QWBRYURn/vEsx SFVzwzuQRJmcAEqeMC4bprTzvSYoSnmN94UBw= Received: by 10.42.149.71 with SMTP id u7mr47246246icv.37.1320670075099; Mon, 07 Nov 2011 04:47:55 -0800 (PST) Received: from [10.0.1.3] (c-24-5-79-250.hsd1.ca.comcast.net. [24.5.79.250]) by mx.google.com with ESMTPS id jm5sm36195273pbc.1.2011.11.07.04.47.18 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Nov 2011 04:47:53 -0800 (PST) References: <60E014B3-4010-4987-BD42-CA4242675BB7@gmail.com> <1320646450.33642.YahooMailNeo@web95202.mail.in2.yahoo.com> In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: 7bit Content-Type: multipart/alternative; boundary=Apple-Mail-22439A2F-1EF8-4CE1-A777-8F8A29DF1C5E Message-Id: <477F356C-DD18-46DC-8463-EF278DE9C97B@gmail.com> Cc: "user@cassandra.apache.org" X-Mailer: iPhone Mail (9A334) From: Anthony Ikeda Subject: Re: Will writes with < ALL consistency eventually propagate? Date: Mon, 7 Nov 2011 04:47:06 -0800 To: "user@cassandra.apache.org" --Apple-Mail-22439A2F-1EF8-4CE1-A777-8F8A29DF1C5E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Riyad, I'm also just getting to know the different settings and values mysel= f :) 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.=20 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). >=20 > Anthony, what you said caught my attention "to ensure all nodes have a cop= y you may not be able to survive the loss of a single node." -- why would th= is be the case? >=20 > I assumed (incorrectly?) that a node would simply disappear off the map un= til I could bring it back up again, at which point all the missing values th= at it didn't get while it was done, it would slowly retrieve from other memb= ers of the ring. Is this the wrong understanding? >=20 > If forcing a replication factor equal to the number of nodes in my ring wi= ll cause a hard-stop when one ring goes down (as I understood your comment t= o mean), it seems to me I should go with a much lower replication factor... s= omething along the lines of 3 or roughly ceiling(N / 2) and just deal with t= he latency when one of the nodes has to route a request to another server wh= en it doesn't contain the value. >=20 > Is there a better way to accomplish what I want, or is keeping the replica= tion factor that aggressively high generally a bad thing and using Cassandra= in the "wrong" way? >=20 > Thank you for the help. >=20 > -Riyad >=20 > On Sun, Nov 6, 2011 at 11:14 PM, chovatia jaydeep wrote: > Hi Riyad, >=20 > You can set replication =3D 5 (number of replicas) and write with CL =3D O= NE. There is no hard requirement from Cassandra to write with CL=3DALL to re= plicate the data unless you need it. Considering your example, If you write w= ith CL=3DONE then also it will replicate your data to all 5 replicas eventua= lly. >=20 > 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? >=20 > I am new to Cassandra and was curious about the following scenario... >=20 > Lets say i have a ring of 5 servers. Ultimately I would like each server t= o be a full replication of the next (master-master-*).=20 >=20 > In a presentation i watched today on Cassandra, the presenter mentioned th= at the ring members will shard data and route your requests to the right hos= t 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 late= ncy. >=20 > If i wanted to avoid the routing and latency and ensure every server had t= he full data set, do i have to write with a consistency level of ALL and wai= t 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? >=20 > I dont mind eventual consistency in my case, but i do (eventually) want al= l nodes to have all values and cannot tell if this is default behavior, or i= f sharding is the default and i can only force duplicates onto the other ser= vers explicitly with a CL of ALL. >=20 > Best, > Riyad >=20 >=20 --Apple-Mail-22439A2F-1EF8-4CE1-A777-8F8A29DF1C5E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Riyad, I'm also just getti= ng to know the different settings and values myself :)<= /div>

I believe, and it also depends on you= r config, CL.ONE Should ignore the loss of a node if your RF is 5, once you i= ncrease the CL then if you lose a node the CL is not met and y= ou will get exceptions returned. 

Sent from m= y iPhone

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

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

Anthony, what you said caught my attentio= n "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 t= he wrong understanding?

If forcing a replicatio= n 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 t= he nodes has to route a request to another server when it doesn't contain th= e value.

Is there a better way t= o accomplish what I want, or is keeping the replication factor that aggressi= vely high generally a bad thing and using Cassandra in the "wrong" way?

Thank you for the help.=

-Riyad<= br>
On Sun, Nov 6, 2011 at 11:14 PM, ch= ovatia jaydeep <chovatia_jaydeep@yahoo.co.in> wrote= :
Hi= Riyad,

You can set replication =3D 5 (number= of replicas) and write with CL =3D ONE. There is no hard requirement from C= assandra to write with CL=3DALL to replicate the data unless you need it. Co= nsidering your example, If you write with CL=3DONE then also it will replica= te your data to all 5 replicas eventually.

Thank you,
Jaydeep

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

I am new to Cassandra and was curious about the followi= ng scenario...

Lets say i have a ring of 5 servers. Ultimately I woul= d like each server to be a full replication of the next (master-master-*). <= br>
In a presentation i watched today on Cassandra, the presenter mentioned t= hat the ring members will shard data and route your requests to the right ho= st when they come in to a server that doesnt physically contain the value yo= u wanted. To the client requesting this is seamless excwpt for the added lat= ency.

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 w= ait 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 prop= agate 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 te= ll 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

<= /div>
= --Apple-Mail-22439A2F-1EF8-4CE1-A777-8F8A29DF1C5E--