Add Balancer

Top  Previous  Next

SUMMARY

Configuring Load Balancing in a Cluster can be done by combining several commands.

Second is to Add the Load Balancer proxy device information. mod_proxy_balancer must be

installed and loaded in the Apache web server being used as the load balancer.

 

SCRIPT

/usr/ngasi/apiclient/bin/ncli.sh -user=admin -password=coolgeek -url=http://localhost:8666 -command=addbalancer -clustername=cluster1 -sysname=rserver1 -exclusive=true -virtualpath=/*

 

JAVA API

Properties properties = new Properties();

properties.put("url","http://localhost:8666");

properties.put("user","admin");

properties.put("password","coolgeek");

properties.put("command","addbalancer");

properties.put("clustername","cluster");

properties.put("sysname","rserver1");

properties.put("exclusive","true");

properties.put("virtualpath","/*");

String result = NGAPIClient.exec(properties);