Configuring a MapR Gateway Master-Slave Topology
Configuring gateways involves installing the
mapr-gateway package on
nodes in a MapR destination cluster and then configuring the MapR source cluster to
communicate with the destination cluster. The Mapr source cluster is configured by
specifying the destination cluster's CLDB node and gateway nodes.
Although it is possible to use a single gateway, the recommended practice is to configure at least two (2), so that replication can continue if a gateway fails. MapR source clusters distribute requests among the gateways in a round-robin fashion. For more information about replication topologies, see Gateways for Replicating MapR-DB Tables and Table Replication.
On the destination cluster, install the
mapr-gatewaypackage on each node where you want to run a gateway on. See Installing MapR Software.Note: On the gateway nodes in the destination cluster, when you run (or re-run) the
configure.shscript (in addition to your regular parameters) be sure to specify the
-Nparameter with the name of the cluster that the gateway belongs to. See configure.sh for more information about
configure.shusage, options, and examples.
If you want to change the port that a gateway is using (by default, gateways
use port 7660):
On the node where the gateway is running, edit the
/opt/mapr/conf/gateway.conffile, uncommenting the line
#gateway.port=7660and changing the port number.
After saving the file, restart the gateway by running this command:
maprcli node services -name gateway -action restart
- On the node where the gateway is running, edit the
On every node in the source cluster, specify the destination cluster's name and
gateway nodes by using one of the following methods. See Managing Gateways for more information about using these
- Running the
maprcli cluster gateway setcommand.
maprcli cluster gateway set -dstcluster <cluster name> -gateways "<space-delimited list of gateways>"
- Adding a DNS record to your DNS server's zone file for your domain.
- Running the