JRun lets you cluster JRun servers behind a web server connector. The web server connector performs load balancing and manages failover among the JRun servers in the cluster, as the following figure shows:
The JRun web server connector supports load balancing and failover when connected to a JRun server that participates in a cluster.
In the web server configuration file (for example, httpd.conf for Apache or jrun.ini for IIS), there is an entry named serverstore. This entry points to a file named jrunserver.store. The jrunserver.store file contains information on the servers in a JRun server cluster.
When you run the Web Server Configuration tool, it automatically detects and displays JRun clusters. If you select a cluster, the Web Server Configuration tool chooses one of the cluster members as the bootstrap server and saves its IP address:web server connector port (also called JCP port) as the bootstrap property in the configuration file. The Web Server Configuration tool also sets the deactivated attribute of the jrun.xml ProxyService to false for all JRun servers in the cluster.
Note: All JRun servers in the cluster must be running when you run the Web Server Configuration tool. If a server is not running, the Web Server Configuration tool cannot modify the deactivated attribute.
When the web server connector starts for the first time, it uses the bootstrap property to detect whether the JRun server is in a cluster and saves the IP address:JCP port of each JRun server in the cluster. For example, if the bootstrap property points to 1.64.22.137:51000 and that JRun server is in a cluster, the connector creates a jrunserver.store file with a proxyservers property containing IP address:JCP port settings similar to the following:
proxyservers=1.64.22.137:51000;1.64.22.143:51000;1.64.22.126:51000; 1.64.22.140:51000
This example assumes that all of the JRun servers are using the default JCP port.
In addition to running the Web Server Configuration tool, you must make the following modifications to the ProxyService in each clustered JRun server's jrun.xml file:
bindToJNDI attribute to true for the ProxyService.
LoadBalancingAlgorithm attribute, as follows:ROUNDROBIN to use this option.
serverweight attribute. Specify ROUNDROBIN_WEIGHTED to use this option.serverweight attribute. Specify RANDOM_WEIGHTED to use this option.ServerWeight attribute. Use this attribute for the weighted round robin and weighted random distribution load balancing algorithms. The default weight is 1 so JRun servers with server weights greater than 1 will receive relatively more requests. This option is useful if some JRun servers in a cluster have more resources than others.StickySessions attribute. Specify true or false. The default is false. If your web applications use session management, you must set this attribute to true.The following example jrun.xml snippet uses the default load-balancing algorithm and sticky sessions:
<service class="jrun.servlet.jrpp.JRunProxyService" name="ProxyService">
��<attribute name="bindToJNDI">true</attribute> ��<attribute name="port">51010</attribute> ��<attribute name="deactivated">false</attribute> ��<attribute name="StickySessions">true</attribute> </service>
The following example jrun.xml snippet uses the weighted round-robin load-balancing algorithm and sticky sessions:
<service class="jrun.servlet.jrpp.JRunProxyService" name="ProxyService">
��<attribute name="bindToJNDI">true</attribute> ��<attribute name="port">51010</attribute> ��<attribute name="deactivated">false</attribute> ��<attribute name="LoadBalancingAlgorithm">ROUNDROBIN_WEIGHTED</attribute> ��<attribute name="ServerWeight">3</attribute> ��<attribute name="StickySessions">true</attribute> </service>
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/jrun/4/JRun_Administrators_Guide/clustering3.htm
Comments
bpurcell said on Mar 5, 2003 at 11:20 AM : bpurcell said on Mar 5, 2003 at 11:21 AM : sxm20 said on Jul 15, 2003 at 3:48 AM : ben pinnick said on Aug 11, 2003 at 3:22 AM : songbin said on Oct 22, 2003 at 11:33 PM : Fuseboxer said on Apr 12, 2004 at 1:53 PM : rio yoshida said on Sep 15, 2004 at 8:02 PM : sdupre said on Oct 29, 2004 at 6:00 AM : mangesh@iflex said on Nov 1, 2004 at 3:19 PM : No screen name said on Dec 7, 2004 at 7:36 AM : rio yoshida said on Apr 19, 2005 at 1:06 AM :