L3/L4 Load Balancing with the Data Fabric Data Access Gateway
You can use haproxy
for L3/L4 load balancing of clients that use the
Data Fabric Data Access Gateway. This topic describes
how to install, configure, and run haproxy
, and how to set your client
connection string to connect to the load balancing service.
Prerequisites
Procedure
-
Install the
haproxy
service on the server you have identified:sudo yum install haproxy
sudo add-apt-repository ppa:vbernat/haproxy-1.7 sudo apt update sudo apt install haproxy
sudo zypper install haproxy
-
Configure the
haproxy
service by setting the following parameters in the configuration file at/etc/haproxy/haproxy.cfg
: -
Restart the
haproxy
service:sudo service haproxy restart
What to do next
Setting Your Client Connection String
Assume you have the following haproxy
configuration settings and you
have installed haproxy
on node1.cluster.com
:
frontend connection_input
mode tcp
bind *:8553
default_backend maprdb_servers
backend maprdb_servers
mode tcp
server srv01 node1.cluster.com:5678
server srv02 node2.cluster.com:5678
You can use the following client connection string with this sample configuration:
node1.cluster.com:8553?auth=basic;user=mapr;password=mapr;ssl=true;sslCA=/opt/mapr/conf/ssl_truststore.pem;sslTargetNameOverride=node1.cluster.com
node1.cluster.com:8553?auth=basic;user=mapr;password=mapr;ssl=false