Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 34AA5200C7D for ; Tue, 2 May 2017 03:38:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 318DA160BC2; Tue, 2 May 2017 01:38:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 506B0160BC1 for ; Tue, 2 May 2017 03:38:14 +0200 (CEST) Received: (qmail 30675 invoked by uid 500); 2 May 2017 01:38:12 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 30665 invoked by uid 99); 2 May 2017 01:38:12 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 May 2017 01:38:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 3C638C01DB for ; Tue, 2 May 2017 01:38:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.49 X-Spam-Level: ** X-Spam-Status: No, score=2.49 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=instaclustr-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id j0tsKspH4vpe for ; Tue, 2 May 2017 01:38:08 +0000 (UTC) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id E0AD35F3BC for ; Tue, 2 May 2017 01:38:07 +0000 (UTC) Received: by mail-it0-f45.google.com with SMTP id r185so40656796itd.1 for ; Mon, 01 May 2017 18:38:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=instaclustr-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=dC611tNiPqpRCKbgnurd59iQJNE9WBBQJLHn/KqCc1o=; b=SCjyQxMyHK9HNDPbqbVDQfw60CuEnlr7ylUQ0WpdKecsLka5V+lrxEKozN5QadKAD/ 47Pvq+qZrUm0h89XhJnkl2Oo7rbqgfMLZFMICdeKMVX6Qi36sLhLxFn+U7yH3UciHVGN bO3P+0TJo0d6qBWRS99XioPFxgHNV7Ew+CjToTizbjdeEgNzDA8Z8YV21ooYc0y+KBu5 +O6qpE+xGTJGKBCi7pwFY7qQCeCplHKVwKOKpRiGuOi5C+BtKlGrUllV2Q3xKh3JNL09 VuXDQ67Sy1I2bTPJzyoez2/XlLKtDFbEQPeQxAnnTxbbHvW1sA/5wCMIbScERZV9iJWr j5HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=dC611tNiPqpRCKbgnurd59iQJNE9WBBQJLHn/KqCc1o=; b=iNmT6PjSO5Zm3oYOE2DgXb0ugAow0EzFMcC/Ai+VHOL30mLGB97C/bLze70NhgYHaV krxee6hwZhn7eAUzTBZTMwyiQGj9rDTEmr8DRue0QX+OTfH2bEF1wo9Zrii8hN8KyrFj nOrigP6nDANQBWW7OyGob/oCGpj1IImayoq0ZedaaOC2+qlkSPwouhAJ/ai5sDW4Ro4D nn+2P6AnBsKf7uQjbWSaAVMOXp5l0MzpHjrvVKY+z5uAVviIMyV/8braeIvDCZUsN5YI 4KSKGI2nM7RXJQS6WkJi2AycC8+MrGwnUPitc3IoC+6dNw3hFEpcevqQecGYg0UYcMLG f1Fg== X-Gm-Message-State: AN3rC/4+lJl2CvDtb2743V3K+DWGAYU/PtX/x4R27EbJCNRA2GN0kyoz 4WcE25S97EzfI4z/KfqkV8FlRBDUKZvU X-Received: by 10.36.80.194 with SMTP id m185mr8469979itb.24.1493689086557; Mon, 01 May 2017 18:38:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Justin Cameron Date: Tue, 02 May 2017 01:37:56 +0000 Message-ID: Subject: Re: Migrating a cluster To: Voytek Jarnot , user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001a1144973068ff1e054e8097c2 archived-at: Tue, 02 May 2017 01:38:15 -0000 --001a1144973068ff1e054e8097c2 Content-Type: text/plain; charset=UTF-8 Yes - this is the recommended way to migrate to another DC. Before you start the migration you'll need to ensure 1. that the replication strategy of all your keyspaces is NetworkTopologyStrategy (if not, change it to this using ALTER KEYSPACE), and 2. that each of your clients is using the DcAwareRoundRobinPolicy load balancing policy, and that the localDc parameter is set to the name of your existing data centre. https://github.com/datastax/java-driver/tree/3.x/manual/load_balancing#dcawareroundrobinpolicy In addition to points 1&2, in order to ensure that your clients do not contact nodes in the new data centre, you will also need to use a LOCAL consistency level for all your queries (e.g. LOCAL_QUORUM instead of QUORUM) Cheers, Justin On Tue, 2 May 2017 at 11:02 Voytek Jarnot wrote: > Have a scenario where it's necessary to migrate a cluster to a different > set of hardware with minimal downtime. Setup is: > > Current cluster: 4 nodes, RF 3 > New cluster: 6 nodes, RF 3 > > My initial inclination is to follow this writeup on setting up the 6 new > nodes as a new DC: > https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsAddDCToCluster.html > > Basically, set up new DC, nodetool rebuild on new nodes to instruct > Cassandra to migrate data, change client to hit new DC, kill original DC. > > First question - is this the recommended way to migrate an in-use cluster > to new hardware? > > Secondly, on the assumption that it is: That link gives the impression > that DC-aware clients will not hit the "remote" DC - is that the case for > the Java driver? We don't currently explicitly set PoolingOptions > ConnectionsPerHost for HostDistance.REMOTE to 0 - seems like that would be > an important thing to do? > > Thank you. > -- *Justin Cameron*Senior Software Engineer This email has been sent on behalf of Instaclustr Pty. Limited (Australia) and Instaclustr Inc (USA). This email and any attachments may contain confidential and legally privileged information. If you are not the intended recipient, do not copy or disclose its content, but please reply to this email immediately and highlight the error to the sender and then immediately delete the message. --001a1144973068ff1e054e8097c2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes - this is the recommended way to migrate to another DC= .

Before you start the migration you'll need to ensu= re=C2=A0
1. that the replication strategy of all your keyspaces i= s NetworkTopologyStrategy (if not, change it to this using ALTER KEYSPACE),= and=C2=A0
2. that each of your clients is using the DcAwareRound= RobinPolicy load balancing policy, and that the localDc parameter is set to= the name of your existing data centre.=C2=A0
Have= a scenario where it's necessary to migrate a cluster to a different se= t of hardware with minimal downtime. Setup is:

Current c= luster: 4 nodes, RF 3
New cluster: 6 nodes, RF 3


Basically, set up new DC, nodetool r= ebuild on new nodes to instruct Cassandra to migrate data, change client to= hit new DC, kill original DC.

First question - is= this the recommended way to migrate an in-use cluster to new hardware?

Secondly, on the assumption that it is: That link giv= es the impression that DC-aware clients will not hit the "remote"= DC - is that the case for the Java driver? We don't currently explicit= ly set PoolingOptions ConnectionsPerHost for HostDistance.REMOTE to 0 - see= ms like that would be an important thing to do?

Th= ank you.
--

Justin Cameron
<= span class=3D"gmail_msg" style=3D"color:rgb(0,0,0);font-family:"helvet= ica neue",helvetica,arial,sans-serif">Senior Softw= are Engineer



This e= mail has been sent on behalf of=C2=A0Instaclustr Pty. Limited (Australia) a= nd=C2=A0Instaclustr Inc (USA).

This email and any attachments may=C2=A0co= ntain confidential and legally privileged=C2=A0information.=C2=A0 If you ar= e not the intended=C2=A0recipient, do not copy or disclose its=C2=A0content= , but please reply to this email=C2=A0immediately and highlight the error t= o the=C2=A0sender and then immediately delete the=C2=A0message.

<= /div>
--001a1144973068ff1e054e8097c2--