Setting of LoadBalancer for Glassfish using SJSWS

Let us setup the loadbalancer for our Glassfish Cluster. Setting up loadbalance is a bit of a tricky job. If any one specific thing is missed out - you will not get your desired results

Note: You can download one single zip containing all the zips from here Download
First and foremost, you will have to install the loadbalancer plugin in your appserver. Unzip and copy the contents of lbpluginappserver.zip in appserver/lib/lbplugin folder such that the files/folders in zip are droped on lbplugin folder.

Let us start by installed the Sun Java System Web Server 7.0. Now execute the steps mentioned below

  1. Copy magnus.conf file in <config-store>/<server-instance>/config (You will find config-store in web-server-install/admin-server)
  2. Copy obj.conf file in the <config-store>/<server-instance>/config
  3. Export loadblancer.xml and copy in <config-store>/<server-instance>/config (You can export this from APPSERVER >> Admin Console >> Http Load Balancers >> New >> Set the config and save. Then click on Export tab and get the loadbalancer file. Rename the file to loadbalancer.xml before using it)
  4. Unzip dts.zip and copy files in <config-store>/<server-instance>/config
  5. Now add the following to the path environmental variable
    • c:\sun\appserver\lib
    • c:\sun\appserver\lib\lbplugin\lib
    • C:\Program Files\Sun\WebServer7\lib\lbplugin\bin
  6. Unzip and copy the contents of plugins.zip in c:\program files\sun\webserver7\plugins
  7. Unzip webserverlbplugins.zip and copy unzipped files in C:\Program Files\Sun\WebServer7\lib\lbplugin
  8. Restart your Sun Java System Web Server
  9. Go to Admin Console of SJSWS http://localhost:8989
  10. Select >> Nodes >> Administration Server (from list) >> Instances >> Click on Configuration Name which is second column in the list. Right top corner will show you option to deploy config. Select that and deploy config.
  11. Again Restart your SJSWS and also the restart / start the instance. If everything was perfect, your Instance will start successfully.



Check your loadbalancer by hitting the web application request on port (81) of your SJSWS - like http://loadbalancernode:81/clusterjsp. The request will be forwarded to any one of the instance configured in loadbalancer.xml. You can optionally check c:\program files \sun\webserver7\<your-instance>\logs\ > access and error logs. You can view the same from Admin Console of the Web Server. Check it out
Congratulatoins - You have setted up the Load Balancer

你可能感兴趣的:(C++,Web,C#,sun,Glassfish)