On Thu, Feb 22, 2018 at 8:11 PM, Jon Haddad <j...@jonhaddad.com> wrote:
> Great question. Unfortunately, our OSS docs lack a step by step process
> on how to add a DC, I’ve created a JIRA to do that:
Thanks. I'd love to contribute as well, just need some questions to be
clarified, maybe even on this thread.
The datastax docs are pretty good for this though: https://docs.datastax.
I don't understand why should this be relevant if the question was about
creating multi-DC cluster *from scratch*. There is no need to care about
auto_boostrap (as discussed above) or use nodetool rebuild.
The only detail is that you might want to use NetworkTopologyStrategy for
system keyspaces as well, which is pre-requisite when using rebuild, but
not required when creating from scratch.
Regarding token allocation, it was random prior to 3.0. In 3.0 and up, it
> is calculated a little more intelligently.
But not by default. To use the new token allocation you need specify
allocate_tokens_for_keyspace in cassandra.yaml (or in JVM_OPTS).
The thing is, if it's a new cluster, there are no user keyspaces yet. So
you'll have to work around by starting at least one node (which
incidentally gets random tokens), then creating your data keyspace, and
only then continue to add more nodes with the setting
This is a bit unfortunate, since the only information the token allocator
actually needs from the keyspace is the replication factors (it doesn't
care about name, replication strategy or actual load on the existing nodes).
The folks at DataStax realized that soon enough, so in DSE the setting is
now called 'allocate_tokens_for_local_replication_factor' and the other one
I believe it would make sense to Apache Cassandra adopt this change, but I
don't see a JIRA for that. Should I open one?
in 3.11.2, which was just released, CASSANDRA-13080 was backported which
> will help out when you add your second DC. If you go this route, you can
> drop your token count down to 16 and get all the benefits with no drawbacks.
This is important, because if you would like to use it on 3.0, it will not
work unless you make sure that auto_boostrap is *not* set to false. This
is not critical when creating DCs from scratch, but requires you to hop
through quite some loops if you already have some data and you want to add
a new DC. Full details in this email thread: