Performing replication of tables in RethinkDB
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:
- By using a web console
- By using ReQL queries
You can use the tableCreate
ReQL method and provide values for shards
and replicaspershard
keys to create your replication; we have covered ReQL queries in detail in Chapter 2, RethinkDB Query Language. So, ...
Get Mastering RethinkDB now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.