问题
I have cassandra cluster of 4 nodes running in production environment in on-premise DC. I have to move it to AWS cassandra. I don't want move cassandra to dynamoDB due to some reason.
Cassandra version used is pretty old i.e. 1.2.9.
How do I move cassandra from on-premise DC to AWS cassandra without data loss and zero downtime.
Regards, Vivek
回答1:
Create a new DC in AWS. Configure inter DC sync between the both DCs. Decommision the old DC.
https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsAddDCToCluster.html
回答2:
I've done this before.
As Alex Tbk said, you'll add nodes at AWS with a new data center.
Add new, empty nodes with a new, logical data center name. You'll need to use the
GossipingPropertyFile
snitch (if you're not already) and specify the DC in thecassandra-rackdc.properties
file. You can also specify a logical rack in that file, and it's usually a good idea to put the AWS availability zone there.After you get one AWS node built, build the rest using the first node's IP as a seed. You won't want them trying to hit your on-prem DC on a restart. And afterward, you will also want to set the first node to use one of the others as a seed node.
Once you get your nodes built, you'll need to modify your keyspace and specify a replication factor for your new AWS DC.
Run a
nodetool rebuild
on each AWS node, using your existing DC as the source.nodetool rebuild -- sourceDCName
Definitely consider upgrading. 1.2 was a solid version, but you're missing out on so many new features/fixes.
Note: Some folks recommend using the AWS specific snitches (EC2Snitch
, EC2MultiRegionSnitch
), but you will want all nodes in your cluster running on the same snitch. So for a hybrid-cloud deployment (before you have a chance to decomm your on-premise nodes), you'll want to stick with the GossipingPropertyFile
snitch. Honestly, that's the only snitch I use, regardless of provider, and you should be fine with that, too.
来源:https://stackoverflow.com/questions/55203850/move-production-env-cassandra-cluster-to-aws-cassandra-without-downtime