Apache load balancing for Tomcat Example (with Wamp server apache module (Apache2.2.xx))
This is continued from the previous post in here . Scenario: You have application running on two tomcat servers. Example is for localhost. Replcae it with relevant IP addresses which the tomcat servers are runing. 1. http://localhost:8080/app/ 2. http://localhost:8090/app/ You need to load balance between two tomcat servers through apache server as well as to hide the actualURLs from outside. Here is the Step by Step instructions. 1. First follow the previous post and configure apache proxy. 2. Let's write a balancer configuration named "mybalancer" with two members who are two tomcat servers. The load should be balanced between those two members (1:1). Add the following segment to httpd.conf file. < PROXY balancer://mybalancer > BalancerMember http://localhost:8080 BalancerMember http://localhost:8090 </ PROXY > 3. Now change the ProxyPass statement to refer the balancing cluster. For that replace line ProxyPass /proxydemo/ http://localhost