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 B832475C5 for ; Thu, 28 Jul 2011 11:58:02 +0000 (UTC) Received: (qmail 43000 invoked by uid 500); 28 Jul 2011 11:58:00 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 42924 invoked by uid 500); 28 Jul 2011 11:57:55 -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 42916 invoked by uid 99); 28 Jul 2011 11:57:54 -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 11:57:54 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.149.209] (HELO na3sys009aog113.obsmtp.com) (74.125.149.209) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 28 Jul 2011 11:57:48 +0000 Received: from mail-ew0-f43.google.com ([209.85.215.43]) (using TLSv1) by na3sys009aob113.postini.com ([74.125.148.12]) with SMTP ID DSNKTjFOpS1YQL8rdTb2kp8+heTpYFDAcAr+@postini.com; Thu, 28 Jul 2011 04:57:27 PDT Received: by mail-ew0-f43.google.com with SMTP id 20so2398737ewy.2 for ; Thu, 28 Jul 2011 04:57:25 -0700 (PDT) Received: by 10.213.17.15 with SMTP id q15mr46704eba.78.1311854245182; Thu, 28 Jul 2011 04:57:25 -0700 (PDT) References: From: Ashley Martens In-Reply-To: Mime-Version: 1.0 (iPhone Mail 8J2) Date: Thu, 28 Jul 2011 04:57:22 -0700 Message-ID: <2683013843859053293@unknownmsgid> 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 Thank you. For 0.7 are the steps similar? On Jul 27, 2011, at 19:56, Jonathan Ellis wrote: > 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