View comments | RSS feed
Contents > Configuring and Administering ColdFusion MX > Using Multiple Server Instances > Enabling load balancing and failover Previous

Enabling load balancing and failover

Load balancing is an enterprise-level feature in which the application server automatically alternates requests among the server instances in a cluster. Clustering also enables application servers to route requests to a running server instance when the original server instance goes down.

Note: These instructions apply only when running ColdFusion MX on JRun. When deploying ColdFusion MX on other J2EE application servers, consult the application server documentation for information on enabling session replication.

You can get load balancing and failover by deploying the ColdFusion application to multiple server instances and adding the instances to a cluster. The web server connector optimizes performance and stability by automatically balancing load and by switching requests to another server instance when a server instance stops running.

For maximum failover protection, use multiple computers in a cluster. However, you must purchase a separate ColdFusion MX license for each computer.

Note: If you set up and test multiple server instances while running the 30-day Trial version, the cluster may not continue to function appropriately when the Trial version reverts to Developer version after 30 days.

To implement failover for the server instances in a cluster, you must enable session replication. Session replication coordinates session information in real-time among the server instances in a cluster. Enabling session replication lets a request be automatically routed to a running server if the current server is unavailable.

To configure a cluster of server instances for load balancing and failover:

  1. Create server instances for the cluster as described in Defining additional server instances.
  2. Deploy ColdFusion on each server instance as described in Deploying ColdFusion MX.
  3. Start each server instance.
  4. Open the ColdFusion MX Administrator on each server instance using the built-in web server. Define the resources (such as data sources and Verity collections) required for the application. If using failover, go to the Memory Variables pages, and enable J2EE sessions. You must do this for all server instances in the cluster.

    Note: Session variables are the only memory variables that support failover. In particular, ColdFusion components do not support failover.

  5. Open the jrun_root/lib/security.properties file and add the IP addresses of the other JRun servers in the cluster to jrun.trusted.hosts.
  6. Open the JMC and create a cluster that contains your server instances.

    Note: Do not add the admin JRun server to a cluster.

  7. If using failover, perform the following steps in the JMC:
    1. Open the cluster by clicking the cluster name in the left panel.
    2. Open the first server instance by clicking its name in the list.
    3. Open the Macromedia ColdFusion MX application.
    4. Specify the context path (usually /).
    5. Select Enable Session Replication.
    6. In the New Replication Buddy field, enter the names of the other servers in the cluster one-by-one, and click Add.
    7. Click Apply.
    8. Perform these steps for every server instance in the cluster.
  8. Run the Web Server Configuration Tool. Choose your website, but instead of choosing a single server instance, select the cluster. For more information, see Web server configuration.
  9. Store the application's CFM files in your external web server root directory.
  10. Test the application to ensure that load balancing and failover work as expected.


Contents > Configuring and Administering ColdFusion MX > Using Multiple Server Instances > Enabling load balancing and failover Previous

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


jrunrandy said on Oct 24, 2003 at 6:52 AM :
After step 7, you should open {jrun-root}\servers\{server-name}\cfmx\WEB-INF\jrun-web.xml and set the <persistence-config> entry to false, as follows:
<persistence-config><active>false</active></persistence-config>, (and then restart the instance.

This does not affect session replication, but does prevent certain exceptions from being thrown.
jrunrandy said on Oct 24, 2003 at 9:04 AM :
Becuase JRun clustering uses JINI, you must be connected to a network for clustering to work.
jrunrandy said on Nov 6, 2003 at 8:37 AM :
There are a couple of missing steps:
* To use / for ColdFusion, you must delete the default-ear directory structure (or change the mapping for the default-ear/default-war web application).
* You must also delete the JRun Flash Remoting app by opening SERVER-INF/jrun.xml and deleting the flashgateway.ear line from the DeployerService.
xrubin said on Dec 8, 2003 at 2:46 PM :
The CF 6.1 installer creates several java paths that prevent session replication from working - a known bug. To fix, open the jvm.config and scroll down to the java.class.path. Delete the following paths:
{application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/lib/cfusion.jar,
{application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/lib
No screen name said on Oct 19, 2004 at 1:49 AM :
but then that kills your Verity and CFX? http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/instal17.htm
You have to have those paths to keep verity and CFX working right?

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/cluste10.htm