Gateways for Replicating MapR-DB Binary Tables

In table replication, MapR-DB replicates updates to tables on source MapR clusters to replicas of those tables on destination MapR clusters. Gateways are services that receive these updates and apply them to the replicas.

Note: All other communication between source and destination clusters does not pass through gateways. For instance, maprcli commands for configuring table replication and all of the utilities that you can use on source and replica tables, such as CopyTable, DiffTables, and so on, require the nodes of the source cluster to communicate directly with the nodes of the destination cluster. To ensure this communication, in the mapr-clusters.conf file on every node in your source cluster, add an entry that lists the CLDB nodes that are in the destination cluster. See mapr-clusters.conf for the format to use for the entries.

You configure gateways on nodes that are in destination clusters. On source clusters, you list the destination clusters and the gateways that are running on them. During replication, MapR-DB sends source table updates to the gateways on the destination clusters where the replicas of those source tables are located. Gateways batch the updates and then apply them to replicas.

All updates from a source table arrive at a replica after having been authenticated at a gateway. Therefore, access control expressions on the replica that control permissions for updates to column families and columns are irrelevant; gateways have the implicit authority to update replicas.

MapR-DB distributes updates to a destination cluster’s gateways in round-robin fashion. If a gateway is down or unreachable, MapR-DB chooses another gateway or retries the operation on the same gateway.

You must configure gateways in destination clusters. If the destination cluster is remote from the cluster in which a source table is located, then the gateways must be in the remote cluster. If the destination cluster is the source cluster, meaning that a source table and its replica are located in a single cluster, then the gateways must be in the local cluster.

For more information about MapR-DB table replication, see Replicating MapR-DB Binary Tables.

Gateways on nodes in remote destination MapR clusters

In this type of topology, gateways receive updates that are made to source tables, authenticate with the destination cluster on behalf of the source cluster, and apply the updates to the corresponding replicas.

This schematic diagram of basic intercluster master-slave replication shows updates to the customers table in the cluster sanfrancisco being sent to gateways. The gateways then apply the updates to the replica that is in the cluster newyork.

The gateways on a destination cluster are not assigned to particular replicas. They apply updates to all replicas on the destination cluster. For example, in this diagram updates to two source tables in the cluster sanfrancisco are being replicated to two replicas in the cluster newyork. There are four gateways. Each gateway receives updates to both source tables, and each gateway applies those updates to both replicas.

Gateways on nodes within a MapR cluster serving as source and destination

In this type of topology, gateways again receive updates that are made to source tables and apply the updates to the replicas. However, all of this activity takes place within a single MapR cluster.

This schematic diagram of basic intracluster master-slave replication shows updates to the customersA table in the cluster sanfrancisco being sent to gateways. The gateways then apply the updates to the table customersB.