We have a fully working cluster with us running two instances of RethinkDB. We can perform replication in our cluster to maintain high availability of data in case of failover. Replication, as the name suggests, means keeping the copy of a table in another instance to mainly handle failover scenarios. However, replication can also help you in scaling your system to improve performance and response time.
RethinkDB provides two ways to perform replication:
You can use the
tableCreate ReQL method and provide values for
replicaspershard keys to create your replication; we have covered ReQL queries in detail in Chapter 2, RethinkDB Query Language. So, ...