Note: This section applies only to FaunaDB Enterprise.
This page will walk you through the steps to add a logical datacenter to your existing FaunaDB Enterprise cluster. If you are starting from scratch, please see Set Up A New Cluster.
In order to add a datacenter, you will need at least one node up and running in the FaunaDB Enterprise cluster.
You will also find instructions for adding your node to the distributed transaction log configuration below.
You can set up a datacenter with one node or many nodes using the steps below.
1. Set up each of your new nodes’ configuration files (faunadb.yml) with
network_datacenter_name: The name of the datacenter you would like to establish for example: ‘replica_2’.
network_broadcast_address: the new node’s IP address
network_listen_address: The interface address that FaunaDB will bind to for incoming requests.
auth_root_key: The root admin key for the FaunaDB Query API.
storage_transaction_log_nodes: The array of addresses of the nodes in the transaction log. (See more here.)
2. Start FaunaDB on your new nodes. On each node, run:
$ faunadb -c »/path/to/faunadb.yml«
3. Then choose a node from your existing FaunaDB environment, and join all of your new nodes to it so they get the data they need:
$ faunadb-admin join »IP of any node in the cluster«
4. Once all your nodes have been joined to the cluster, add the new datacenter by running the following from any node:
faunadb-admin add-replica »New Datacenter Name«
Use the status admin command to track the progress of replicating data to the new nodes:
$ faunadb-admin status
While this step is not required, we recommend that you configure your cluster to replicate the transaction log to at least 3 datacenters in order to ensure the cluster’s ability to process writes in the event that one datacenter goes down.
The physical location of the datacenters which replicate the transaction log affects write latency. Writes originating closer to the datacenters replicating the transaction log will have a lower latency than writes originating from farther away.
We advise that you choose one node in your new datacenter for each log partition you have configured for your cluster. You should then follow all of the below instructions with each node, one at a time.
- In the faunadb.yml of the new node, locate the
- Add the new node’s IP address to the right of the other IP address(es) listed, separated by a comma.
- Restart the new node.
- Update the faunadb.yml of all other nodes in your Enterprise cluster with the full new log partition configuration in
- Restart all nodes, round-robin style.