cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon McCauslin <>
Subject Re: Migrating to new datacenter
Date Mon, 07 Apr 2014 17:48:21 GMT
Thanks for the confirmation on the approach.  The new dc is not yet ready,
but while I'm waiting I was thinking about updating the existing dc's
replication strategy from "SimpleStrategy" to "NetworkTopologyStrategy".  I
also assume I'll need to update my snitch from the current SimpleSnitch to
PropertyFileSnitch.  Here's the steps I'm thinking:

  1. update snitch from SimpleSnitch to PropertyFileSnitch
       - edit/create to enumerate all nodes
in current dc
 - change snitch in cassandra.yaml on all nodes
 - restart all nodes??
 - run full repair on keyspace
  2.  update replication from "SimpleStrategy" to "NetworkTopologyStrategy"
      a.  ALTER KEYSPACE cfs
             WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'dc1'
: 3};
      b. nodetool repair cfs

Let me know if anything here sounds wrong.  Thanks!

 would like to start preparing the existing datacenter

 wondering if I could start updating the existing datacenter's replication

On Mon, Apr 7, 2014 at 12:45 PM, Mark Reddy <> wrote:

> I would go with option 1.
> I think it is the safer of the two options, involves less work and if
> something were to go wrong mid migration you can remove the second DC from
> your keyspace replication and have a clean break. SimpleStrategy will work
> across DCs. It is generally advised to not use it across DCs as it is hard
> to maintain and can induce latency on writes depending on DC distance,
> however as you are just migrating and then killing the original DC you
> won't face these issues.
> Mark
> On Mon, Apr 7, 2014 at 5:25 PM, Brandon McCauslin <>wrote:
>> We're currently running a small 5 node 2.0.5 cluster in a single
>> datacenter using the SimpleStrategy replication strategy with replication
>> factor of 3.  We want to migrate our data from our current datacenter to a
>> new datacenter, without incurring any downtime or data loss.  There is no
>> plan to maintain or keep the old (current) datacenter after the migration
>> is complete.  I'm wondering how best to go about this migration.
>> *Shoud We:*
>>    1. add a 2nd datacenter as described here - "Adding a datacenter to
>>    cluster<>",
>>    then decommission the 1st datacenter<>.
>>     Can we even do this given we're currently setup with SimpleStrategy
>>    replication?
>>    2. or should we just start adding new nodes from the new datacenter
>>    to our existing cluster as described here<>?
>>     Then once we've added all the new nodes, start decommissioning all the old
>>    nodes from the old/current datacenter as described here<>
>>    .
>> Thanks for your help and time!

View raw message