Setting Up A Multi-Datacenter Cluster with Instaclustr

Instaclustr's automated provisioning system, with some help from our technical operations team, makes provisioning a multi-datacenter cluster easy. However, there are still several steps to co-ordinate - this article provides a step-by-step guide. (This article uses the abbreviation dc for datacenter from here on)

New Clusters

If you are creating a cluster and plan on multiple dcs from the beginning, then the process is simple:

  1. Create a single dc cluster using the Instaclustr console. Refer our support articles on how to signup for an instaclustr account and create a cluster.
  2. Use the "Add Datacenter" button on the cluster details page of the console to configure and request an additional dc. (for a step by step guide see Expanding your cluster).
  3. Instaclustr Support will receive the request, verify with you that your cluster is prepared and then allow the provisioning system to provision the new dc.
  4. When creating your schema and application:
    1. Ensure that you use NetworkTopologyStrategy as the replication strategy when creating keyspaces. Specify the number of replicas that Cassandra should maintain in each dc.
    2. When connecting to Cassandra consider the appropriate consistency factor for your use case - the difference between QUOROM and LOCAL_QUOROM (or ONE and LOCAL_ONE) becomes significant once you have multiple dcs.

Existing Clusters

If you wish to add a dc to a cluster that is in use then there a few more steps required to set up the new replica while minimising impact to your existing cluster:

  1. Ensure all keyspaces are configured with NetworkTopologyStrategy and replication for the existing dc.
  2. Ensure your application is using LOCAL_* consistency factor when connecting to your existing dc (even if you plan to use cross-dc consistency at a later date you probably don't want cross-dc queries to start until the new dc is fully set up).
  3. Use the "Add Datacenter" button on the cluster details page of the console to configure and request an additional dc. (for a step by step guide see Expanding your cluster).
  4. Instaclustr Support will receive the request, verify with you that your cluster is prepared and then allow the provisioning system to provision the new dc. Support will confirm that the system keyspaces are correctly synched to the new dcs.
  5. When advised by Instaclustr Support that the new dc is ready, alter the replication strategy for your keyspaces to specify the number of replicas in the new dc and advise Instaclustr Support when complete.
  6. Instaclustr Support will execute nodetool reload on each node in the new dc to sync data from the existing dc.

Network Usage

Be aware that cross-region and cross-provider replication will count towards your network usage under Instaclustr's fair use policy and may incur additional charges when running in Instaclustr’s cloud provider account. If you are planning on using multiple dcs in this configuration then please contact Instaclustr Support to assist with capacity planning.

Further Questions

As always, Instaclustr Support is available to provide additional information and guide you through this process.

Last updated:
If you have questions regarding this article, feel free to add it to the comments below.

0 Comments

Please sign in to leave a comment.