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 D2B1F76F1 for ; Thu, 28 Jul 2011 02:56:30 +0000 (UTC) Received: (qmail 39587 invoked by uid 500); 28 Jul 2011 02:56:27 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 39346 invoked by uid 500); 28 Jul 2011 02:56:23 -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 39326 invoked by uid 99); 28 Jul 2011 02:56:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2011 02:56:22 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-ww0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2011 02:56:16 +0000 Received: by wwe5 with SMTP id 5so1655010wwe.25 for ; Wed, 27 Jul 2011 19:55:56 -0700 (PDT) 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=86UH0vUZr+tJ1UB841/Bx3Yz7t5tBxvrYJ898c/FLpw=; b=veOuvxbU7CwEWFevetdrzJrhH8J4OWjIjaGx54w+GDW2X+7liEWXh0cHFSTMqv8fGW V0o49ihcwkb1Oug6pms1aTKvqyco6uYr91SuqzVsM5HfWrTb/pPqK4H2lZ2TqC3KXmJz 0Dkvpk92iqBV+gDEjqtLO9DxohCnXB8nIk1o4= Received: by 10.227.160.140 with SMTP id n12mr619343wbx.69.1311821756060; Wed, 27 Jul 2011 19:55:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.135.36 with HTTP; Wed, 27 Jul 2011 19:55:36 -0700 (PDT) In-Reply-To: References: From: Jonathan Ellis Date: Wed, 27 Jul 2011 21:55:36 -0500 Message-ID: Subject: Re: Expanding 0.6.x cluster to multiple datacenters To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org As you know, with 0.6 adding a datacenter is not as easy as 0.7 with NetworkTopologyStrategy. With 0.6 there is a right way that will work with some manual effort, and a wrong way that can cause you major pain and grief. The right way: - Switch to a DC-aware snitch but leave your cluster on RUS to start with. - Bootstrap the 2nd datacenter nodes (halfway) in between your 1st datacenter tokens, so your ring alternates DC1 DC2 DC1 DC2 etc. Do this one at a time for minimum disruption. You should have equal node counts in each DC because RAS will keep data in each DC about equal. - Switch the cluster to RAS - Start repair. You will need to run repair on each node. In 0.6 you should only run repair against one node at a time. - While repair is going on, you need to do reads at at least CL.QUORUM or data may appear to be missing, since it's not yet in all the places the new strategy will look. (But by alternating DC around the ring, 2 of the 3 replicas are guaranteed to be the same for both RUS and RAS.) The wrong way: - Switch to RAS, then start adding nodes in the new DC. As soon as you add the first node in DC2, RAS will try to replicate ALL the rows in DC1 to it. Usually this overwhelms the DC2 node and it dies a fiery death. On Wed, Jul 27, 2011 at 7:44 PM, Ashley Martens wrote: > I have a current 0.6.x cluster in a single datacenter with RackUnaware and > am looking to expand into a second data center. I know I need to change to > RackAwareStrategy however, I'm not sure what will happen to my data when I > restart the nodes in the current cluster before I even add the new DC. Will > the data need to move based on the rack each node is in or will it stay on > the node it is currently on? Also, when I start adding nodes in the new DC > to the cluster should they come in one at a time, like bootstrap, or should > I light up several at the same time to distribute the data? > > For reference I have 19 nodes in my cluster. > > Thanks. > -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com