Managing State in a Clustered Environment  
 
 

Because of the nature of a clustered environment, ColdFusion variables that are stored in memory or the registry, such as application, session, and server variables, are not sustained by default when a user is balanced, or shifted from one server in a cluster to another in order to balance server load. For example, using server variables in a clustered server environment won't work, since server variables are not carried from one server in a cluster to another when users are shifted to another server. State cannot be maintained correctly. Client variables, however, can be sustained because they can be stored in an external repository. If you are planning to migrate a ColdFusion application that uses session and server variables to a clustered server environment, you need to consider how to deal with this issue.

 
 
  How to maintain session variables  
 
 

An option in the ClusterCATS Explorer allows you to override the mechanism that would otherwise balance a session among servers in the cluster. Here's how to do it.

 
 
  To maintain session variables in a cluster:  
 
  1. Make sure session variables have been enabled in the ColdFusion Administrator, Variables page.
  2. Open the ClusterCATS for ColdFusion Explorer.
  3. Right click the cluster in which you want to enable session aware load balancing, and select Configure > Administration. The properties dialog for the selected cluster appears.

  4. At the bottom of the dialog, click to enable the Enable session aware load balancing option.

Once enabled, ClusterCATS maintains session state by ensuring the current session remains connected to the server on which state was set. After being balanced on initial connection, the user will not be shifted or balanced to another server in the cluster during the session.

 
 
  Note  
 

There may be significant site performance costs associated with enabling this feature, since users will never be balanced to other servers in a cluster, regardless how heavy the load may be on the server maintaining state.



 
 
BackUp LevelNext
 
 

allaire     AllaireDoc@allaire.com
    Copyright © 1998, Allaire Corporation. All rights reserved.