cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pradeep Chhetri <prad...@stashaway.com>
Subject Re: Default Single DataCenter -> Multi DataCenter
Date Mon, 10 Sep 2018 13:26:57 GMT
Hello Eunsu,

I am going through the same exercise at my job. I was making notes as i was
testing the steps in my preproduction environment. Although I haven't
tested end to end but hopefully this might help you:
https://medium.com/p/465e9bf28d99

Regards,
Pradeep

On Mon, Sep 10, 2018 at 5:59 PM, Alain RODRIGUEZ <arodrime@gmail.com> wrote:

> Adding a data center for the first time is a bit tricky when you
> haven't been considering it from the start.
>
> I operate 5 nodes cluster (3.11.0) in a single data center with
>> SimpleSnitch, SimpleStrategy and all client policy RoundRobin.
>>
>
> You will need:
>
> - To change clients, make them 'DCAware'. This depends on the client, but
> you should be able to find this in your Cassandra driver (client side).
> - To change clients, make them use 'LOCAL_<WHATEVER>' consistency
> ('LOCAL_ONE'/'LOCAL_QUORUM' being the most common).
> - To change 'SimpleSnitch' for 'EC2Snitch' or
> 'GossipingPropertyFileSnitch' for example, depending on your
> context/preference
> - To change 'SimpleStrategy' for 'NetworkTopologyStrategy' for all the
> keyspaces, with the desired RF. I take the chance to say that switching to
> 1 replica only is often a mistake, you can indeed have data loss (which you
> accept) but also service going down, anytime you restart a node or that a
> node goes down. If you are ok with RF=1, RDBMS might be a better choice.
> It's an anti-pattern of some kind to run Cassandra with RF=1. Yet up to
> you, this is not our topic :). In the same kind of off-topic
> recommendations, I would not stick with C*3.11.0, but go to C*3.11.3 (if
> you do not perform slice delete, there is still a bug with this apparently)
>
> So this all needs to be done *before* starting adding the new data
> center. Changing the snitch is tricky, make sure that the new snitch uses
> the racks and dc names currently in use in your cluster for the current
> cluster, if not the data could not be accessible after the configuration
> change.
>
> Then the procedure to add a data center is probably described around. I
> know I did this detailed description in 2014, here it is:
> https://mail-archives.apache.org/mod_mbox/cassandra-user/
> 201406.mbox/%3CCA+VSrLopop7Th8nX20aOZ3As75g2jrJm
> 3ryX119dekLYNHqFwA@mail.gmail.com%3E, but you might find better/more
> recent documentation than this one for this relatively common process, like
> the documentation you linked.
>
> If you are not confident or have doubts, you can share more about the
> context and post your exact plan, as I did years ago in the mail previously
> linked. People here should be able to confirm the process is ok before you
> move forward, giving you an extra confidence.
>
> C*heers,
> -----------------------
> Alain Rodriguez - @arodream - alain@thelastpickle.com
> France / Spain
>
> The Last Pickle - Apache Cassandra Consulting
> http://www.thelastpickle.com
>
> Le lun. 10 sept. 2018 à 11:05, Eunsu Kim <eunsu.bill23@gmail.com> a
> écrit :
>
>> Hello everyone
>>
>> I operate 5 nodes cluster (3.11.0) in a single data center with
>> SimpleSnitch, SimpleStrategy and all client policy RoundRobin.
>>
>> At this point, I am going to create clusters of the same size in
>> different data centers.
>>
>> I think these two documents are appropriate, but there is confusion
>> because they are referenced to each other.
>>
>> https://docs.datastax.com/en/cassandra/3.0/cassandra/
>> operations/opsAddDCToCluster.html
>> https://docs.datastax.com/en/cassandra/3.0/cassandra/
>> operations/opsSwitchSnitch.html
>>
>> Anyone who can clearly guide the order? Currently RF is 2 and I want to
>> have only one replica in the NetworkTopologyStrategy.
>> A little data loss is okay.
>>
>> Thank you in advanced..
>>
>>
>>
>>
>>
>>
>>

Mime
View raw message