Configuring Gateways for Table and Stream Replication

Configuring gateways involves installing the mapr-gateway package on nodes on a Data Fabric destination cluster and then configuring the Data Fabric source cluster to communicate with the destination cluster. The Data Fabric source cluster is configured by specifying the destination cluster's CLDB node and gateway nodes.

How Many Gateways to Configure?

Although it is possible to use a single gateway, the recommended practice is to configure at least two (2) gateways, so that replication can continue if one gateway fails. Data Fabric source clusters distribute requests among the gateways in a round-robin fashion. See Gateways for Replicating HPE Ezmeral Data Fabric Database Tables, Table Replication, and Preparing Clusters for Stream Replication for more information about replication.

For more information about setting up cross-cluster security, including cross-cluster security for table and stream replication, see Setting Up Cross-Cluster Security.

Default Gateway Configuration for Replication

If you do not perform any of these options, HPE Ezmeral Data Fabric Database uses the configuration from the mapr-clusters.conf file. It uses the cluster name specified in that file as the destination cluster, and the CLDB node addresses as the gateway nodes. You must have gateways running on these CLDB nodes.

Configuration Procedure

TIP
To list the current gateways, see cluster gateway get.
  1. On the destination cluster, install the mapr-gateway package on each node where you want to run a gateway. See Step 4: Install Cluster Service Packages.

    NOTE
    On the gateway nodes in the destination cluster, when you run (or re-run) the configure.sh script (in addition to your regular parameters) be sure to specify the -N parameter with the name of the cluster to which the gateway belongs. For more information about configure.sh usage, options, and examples, see configure.sh.
  2. To change the port that a gateway uses (by default, gateways use port 7660):

    1. On the node where the gateway is running, edit the /opt/mapr/conf/gateway.conf file, ensure that the line #gateway.port=7660 is not commented, and change the port number. For more information about gateway.conf configuration properties, see gateway.conf.

    2. After saving the file, restart the gateway by running this command: maprcli node services -name gateway -action restart

  3. On the source cluster, specify the destination cluster's name and gateway nodes by using one of the following methods:

    • Run the maprcli cluster gateway set command:
      maprcli cluster gateway set -dstcluster <cluster name> -gateways "<space-delimited list of gateways>"

      The following sample command sets two gateway nodes on the destination cluster my.cluster.com:

      maprcli cluster gateway set -dstcluster my.cluster.com -gateways "node1.com node2.com"
    • Add a DNS record to your DNS server's zone file for your domain.

    See Managing Gateways for more information about using these methods.