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, for this chapter, we will be covering replication using a web console, which is indeed a promising feature of RethinkDB (that is, easy administration).
To perform replication of tables, open your administrative screen and go to the tables screen. If...