This article provides steps that are needed to configure load balancer while setting up a clustered environment in a distributed network. However, this should not be considered a full and final configuration for a full-fledged production stable configuration. To make a production stable load balancing server, several configurations need to be done.
This is just an illustration of how the basic configuration can be carried out with limited resource availability.
Server 1: Exposed a web service or open for web requests.
Server 2: Expose a web service that is open for web request and also hosts a apache load balancer
Server 1 and 2 are running on a separate IPs
HTTP Port on Server 1: 8091
HTTP Port on Server 2: 8091
Apache HTTPD server port: 8090 setup on Server 2
Server 1 setup for hosting SOAP service exposed on mule server with following URI: http://<>:8091/hello?wsdl
Required to keep this file under ‘conf/extra/’ folder
httpd-proxy-balance.conf should look like
<IfModule mod_proxy_balancer.c> ServerName www.mycompany.com ProxyRequests off <Location /balancer-manager> Set Handler balancer-manager Order deny,allow Allow from all </Location> ProxyPass /balancer-manager ! ProxyPass / balancer://mycluster/ stickysession=SESSION_ID <Proxy balancer://mycluster > BalancerMember http://10.0.1.86:8091 loadfactor=4 route=node1 BalancerMember http://10.0.1.43:8091 loadfactor=6 route=node2 # Load Balancer Settings # We will be configuring a simple Round # Robin style load balancer. This means # that all webheads take an equal share of # of the load. ProxySet lbmethod=byrequest </Proxy> </IfModule>
Point at the browser, and access http://<>:8090/ In this case it is http://10.0.1.86:8090/hello?wsdl
This will take us to the exposed web service on a round robin basis and shares equal load between 10.0.1.43 and 10.0.1.86
If you would like to find out more about how APIs could help you make the most out of your current infrastructure while enabling you to open your digital horizons, do give us a call at +44 (0)203 475 7980 or email us at Salesforce@coforge.com