Managing Client State in a Clustered Environment

To maintain your ColdFusion Web application's state in a clustered environment, you can use server-side client variables that get stored in a common, back-end repository that all Web servers in a multi-server clustered environment can access. Even though all state information will be stored in client variables in the repository, a mechanism must be used to identify specific client requests. This is typically accomplished by dropping a client-side identifier, such as a cookie, on the user's machine.

ColdFusion 4.5 provides several client variable attributes in the CFApplication tag that allow you to maintain application state across a cluster when using server-side client variables. These attributes enable client variable management and set CFID and CFTOKEN cookies at the domain level (for example, .allaire.com). If ID and token combinations already exist on each host in the cluster, ColdFusion migrates the host-level cookies on each cluster member to the single, common domain-level cookie. Following the setting or migration of host-level cookies to a domain-level cookie, ColdFusion creates a new cookie (CFMAGIC) that tells ColdFusion that domain cookies have been set.

This domain-level cookie allows a ColdFusion application to maintain specific client information across a server cluster.