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 D18EA9479 for ; Sat, 17 Mar 2012 12:48:57 +0000 (UTC) Received: (qmail 18167 invoked by uid 500); 17 Mar 2012 12:48:55 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 18097 invoked by uid 500); 17 Mar 2012 12:48:54 -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 18087 invoked by uid 99); 17 Mar 2012 12:48:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Mar 2012 12:48:54 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.220.172] (HELO mail-vx0-f172.google.com) (209.85.220.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Mar 2012 12:48:50 +0000 Received: by vcbfk13 with SMTP id fk13so6211286vcb.31 for ; Sat, 17 Mar 2012 05:48:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=pbhasq8VTb5jlB7OtB7sLd0hdDVhMNDO3pGKo5etxiM=; b=cw9AqEPzdrev2eBaZoFrjCJg9UKGiHFNLTLGt+Ufe8QNJk6Iyln7Kkzx69xpL5qN/g YisyTPJSrX+++sgidEt5wvMNE4+ZB1ZPs6CruBeEzt541C+8WcCq/fKMlbBxtFnFVVJI ZNkUbfzMZRT1+Ft820BrWzi/3T2N/eAkFQLIZoRHNvkAy6yAjEtWQz+zySU9VMaRRL0v 348+WVYw4NzSO4t6Kby1Qu2qKrVdtP5Vfg0Vr1Kq3W9JZY8XeZy2I/KkLvuVoOVz9T4a meR87xzizjp2tBq8JoArGp+m+RX9jmPuCeuXFcT61KsrAVTZKTkes0YWeeRmTsP21spY Ilvg== MIME-Version: 1.0 Received: by 10.220.228.200 with SMTP id jf8mr1841198vcb.0.1331988507364; Sat, 17 Mar 2012 05:48:27 -0700 (PDT) Received: by 10.220.76.66 with HTTP; Sat, 17 Mar 2012 05:48:27 -0700 (PDT) In-Reply-To: References: <638859F2-AF96-4533-8F5D-BD524056FADD@venarc.com> Date: Sat, 17 Mar 2012 13:48:27 +0100 Message-ID: Subject: Re: Single Node Cassandra Installation From: "R. Verlangen" To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=14dae9cdc0f9d38e1c04bb6fbdc3 X-Gm-Message-State: ALoCoQmhTzIluD5qKB1E90hMx3CLjJUtAkp/5BbmD/vDy2oxB1OZFBc3EeuRH4zQTgprWgpVdWCj X-Virus-Checked: Checked by ClamAV on apache.org --14dae9cdc0f9d38e1c04bb6fbdc3 Content-Type: text/plain; charset=ISO-8859-1 " By default Cassandra tries to write to both nodes, always. Writes will only fail (on a node) if it is down, and even then hinted handoff will attempt to keep both nodes in sync when the troubled node comes back up. The point of having two nodes is to have read and write availability in the face of transient failure. " Even more: if you enable read repair the chances of having bad writes decreases for any further reads. This will make your cluster become faster consistent again after some failure. Also consider to use different CL's for different operations. E.g. the Twitter timeline can miss some records, however if you would want to display my bank account I would prefer to see the right thing: or a nice error message. 2012/3/16 Ben Coverston > Doing reads and writes at CL=1 with RF=2 N=2 does not imply that the reads > will be inconsistent. It's more complicated than the simple counting of > blocked replicas. It is easy to support the notion that it will be largely > consistent, in fact very consistent for most use cases. > > By default Cassandra tries to write to both nodes, always. Writes will > only fail (on a node) if it is down, and even then hinted handoff will > attempt to keep both nodes in sync when the troubled node comes back up. > The point of having two nodes is to have read and write availability in the > face of transient failure. > > If you are interested there is a good exposition of what 'consistency' > means in a system like Cassandra from the link below[1]. > > [1] > http://www.eecs.berkeley.edu/~pbailis/projects/pbs/ > > > On Fri, Mar 16, 2012 at 6:50 AM, Thomas van Neerijnen < > tom@bossastudios.com> wrote: > >> You'll need to either read or write at at least quorum to get consistent >> data from the cluster so you may as well do both. >> Now that you mention it, I was wrong about downtime, with a two node >> cluster reads or writes at quorum will mean both nodes need to be online. >> Perhaps you could have an emergency switch in your application which flips >> to consistency of 1 if one of your Cassandra servers goes down? Just make >> sure it's set back to quorum when the second one returns or again you could >> end up with inconsistent data. >> >> >> On Fri, Mar 16, 2012 at 2:04 AM, Drew Kutcharian wrote: >> >>> Thanks for the comments, I guess I will end up doing a 2 node cluster >>> with replica count 2 and read consistency 1. >>> >>> -- Drew >>> >>> >>> >>> On Mar 15, 2012, at 4:20 PM, Thomas van Neerijnen wrote: >>> >>> So long as data loss and downtime are acceptable risks a one node >>> cluster is fine. >>> Personally this is usually only acceptable on my workstation, even my >>> dev environment is redundant, because servers fail, usually when you least >>> want them to, like for example when you've decided to save costs by waiting >>> before implementing redundancy. Could a failure end up costing you more >>> than you've saved? I'd rather get cheaper servers (maybe even used off >>> ebay??) so I could have at least two of them. >>> >>> If you do go with a one node solution, altho I haven't tried it myself >>> Priam looks like a good place to start for backups, otherwise roll your own >>> with incremental snapshotting turned on and a watch on the snapshot >>> directory. Storage on something like S3 or Cloud Files is very cheap so >>> there's no good excuse for no backups. >>> >>> On Thu, Mar 15, 2012 at 7:12 PM, R. Verlangen wrote: >>> >>>> Hi Drew, >>>> >>>> One other disadvantage is the lack of "consistency level" and >>>> "replication". Both ware part of the high availability / redundancy. So you >>>> would really need to backup your single-node-"cluster" to some other >>>> external location. >>>> >>>> Good luck! >>>> >>>> >>>> 2012/3/15 Drew Kutcharian >>>> >>>>> Hi, >>>>> >>>>> We are working on a project that initially is going to have very >>>>> little data, but we would like to use Cassandra to ease the future >>>>> scalability. Due to budget constraints, we were thinking to run a single >>>>> node Cassandra for now and then add more nodes as required. >>>>> >>>>> I was wondering if it is recommended to run a single node cassandra in >>>>> production? Are there any other issues besides lack of high availability? >>>>> >>>>> Thanks, >>>>> >>>>> Drew >>>>> >>>>> >>>> >>> >>> >> > > > -- > Ben Coverston > DataStax -- The Apache Cassandra Company > > --14dae9cdc0f9d38e1c04bb6fbdc3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable " By default Cassandra tries to write to both nodes, always. Writ= es will only fail (on a node) if it is down, and even then hinted handoff w= ill attempt to keep both nodes in sync when the troubled node comes back up= . The point of having two nodes is to have read and write availability in t= he face of transient failure.=A0"

Even more: if you enable read repair the chances of having b= ad writes decreases for any further reads. This will make your cluster beco= me faster consistent again after some failure.

Also consider to use different CL's for different operations. E.g. the = Twitter timeline can miss some records, however if you would want to displa= y my bank account I would prefer to see the right thing: or a nice error me= ssage.=A0

2012/3/16 Ben Coverston <ben.coverston@datastax= .com>
Doing reads and writes at CL=3D1 with RF=3D2 N=3D2 does not imply that= the reads will be inconsistent. It's more complicated than the simple = counting of blocked replicas. It is easy to support the notion that it will= be largely consistent, in fact very consistent for most use cases.

By default Cassandra tries to write to both nodes= , always. Writes will only fail (on a node) if it is down, and even then hi= nted handoff will attempt to keep both nodes in sync when the troubled node= comes back up. The point of having two nodes is to have read and write ava= ilability in the face of transient failure.

If you are interested there is a good exposition of wha= t 'consistency' means in a system like Cassandra from the link belo= w[1].

[1]


On Fri, Mar 16, 2012 at 6:50 AM, Thomas van Neerijnen <tom@= bossastudios.com> wrote:
You'll need to either read or write at at least quorum to get consisten= t data from the cluster so you may as well do both.
Now that you mention= it, I was wrong about downtime, with a two node cluster reads or writes at= quorum will mean both nodes need to be online. Perhaps you could have an e= mergency switch in your application which flips to consistency of 1 if one = of your Cassandra servers goes down? Just make sure it's set back to qu= orum when the second one returns or again you could end up with inconsisten= t data.


On Fri, Mar 16, 2012 at 2:04 AM, Drew Kutcha= rian <drew@venarc.com> wrote:
Thanks for the comments, I guess I will= end up doing a 2 node cluster with replica count 2 and read consistency 1.=

-- Drew


<= div>
On Mar 15, 2012, at 4:20 PM, Thomas van Neerijnen wrote:<= /div>
So long as data loss and downtime are ac= ceptable risks a one node cluster is fine.
Personally this is usually only acceptable on my workstation, even my dev e= nvironment is redundant, because servers fail, usually when you least want = them to, like for example when you've decided to save costs by waiting = before implementing redundancy. Could a failure end up costing you more tha= n you've saved? I'd rather get cheaper servers (maybe even used off= ebay??) so I could have at least two of them.

If you do go with a one node solution, altho I haven't tried it mys= elf Priam looks like a good place to start for backups, otherwise roll your= own with incremental snapshotting turned on and a watch on the snapshot di= rectory. Storage on something like S3 or Cloud Files is very cheap so there= 's no good excuse for no backups.

On Thu, Mar 15, 2012 at 7:12 PM, R. Verlange= n <r= obin@us2.nl> wrote:
Hi Drew,

One other disadvantage is the lack of "con= sistency level" and "replication". Both ware part of the hig= h availability / redundancy. So you would really need to backup your single= -node-"cluster" to some other external location.

Good luck!


= 2012/3/15 Drew Kutcharian <drew@venarc.com>
Hi,

We are working on a project that initially is going to have very little dat= a, but we would like to use Cassandra to ease the future scalability. Due t= o budget constraints, we were thinking to run a single node Cassandra for n= ow and then add more nodes as required.

I was wondering if it is recommended to run a single node cassandra in prod= uction? Are there any other issues besides lack of high availability?

Thanks,

Drew








<= /div>--
Ben CoverstonDataStax -- The Apache Cassandra Company

--14dae9cdc0f9d38e1c04bb6fbdc3--