New to ColdFusion MX 7 Enterprise Edition is integrated load balancing and failover, with the capability to create and manage a cluster directly from the ColdFusion Administrator. ColdFusion MX 7 Load Balancing monitors your ColdFusion MX 7 servers and can redirect requests away from a server that is beginning to enter a busy state. When ColdFusion Load Balancing redirects requests to another server, it does so by redirecting them to the URL of another machine in the cluster. If your server is completely out of commission (that is, turned off), ColdFusion Load Balancing cannot communicate with it and therefore cannot redirect requests away from it. Perhaps the most attractive aspect of using ColdFusion MX 7 Load Balancing for load-balancing solutions is its integration with ColdFusion MX 7. ColdFusion MX 7 Load Balancing is extremely easy to configure and set up, unlike many other software and hardware load-balancing solutions. Understanding ColdFusion MX 7 Load BalancingColdFusion Load Balancing consists of server and client components. The server component runs on the ColdFusion MX 7 server. ColdFusion MX 7 Load Balancing Explorer is the client-management facility for building and managing clusters. Each of these components plays a critical role in the configuration and support of your ColdFusion MX 7 Load Balancing clusters. The server component manages the server's contact with the cluster. The client component allows management of the cluster, creation of alarms, and cluster monitoring. CAUTION Be sure to test your Web site when redirection occurs from one Web server to another. To function properly, your application may need to compensate for path variables or employ session-state management. NOTE Although you can have a cluster consisting of a mix of Unix-, Solaris-, and Windows-based servers running ColdFusion MX 7 Load Balancing, you must have at least one Windows machine to run the ColdFusion MX 7 Load Balancing Explorer, or to run ColdFusion MX 7 Load Balancing Web Explorer for Unix clusters. Configuring a Load Balanced ClusterSetup and configuration of ColdFusion MX 7 Load Balancing is very simple. But before we walk through the process, there are a few things you need to do before you deploy your cluster. First, confirm that all instances of ColdFusion you want to cluster are set up identically, with exactly the same databases, code, mappings, and so on. If you are going to use session failover, make sure you turn on J2EE sessions in the ColdFusion Administrator, and enable session replication for each server. This will allow your session data to be shared across systems in the cluster, so if one ColdFusion instance is unavailable, your users' requests will be routed to another free server without session data being lost. NOTE During session replication, all session data is copied to each server in the cluster every time the data is modified. In applications that store large amounts of data in the session scope, this data duplication will have a negative impact on performance. One way around it is to store data in client variables and use a database as the client storage mechanism. Configuring a cluster of ColdFusion servers is uncomplicated, and for this example you can use the instances you created in the earlier section "Multiple ColdFusion Instances." If you have multiple remote servers, the same steps will be applicable.
If your server is up and running and you want to take it out of the cluster for maintenance, you can simply remove the instance(s) for that server from the cluster via the ColdFusion MX 7 Administrator. When you're finished with maintenance, you can simply add the instance(s) back in. Or, if you want to add more ColdFusion MX 7 servers to the cluster, simply add them via the ColdFusion MX 7 Administrator. Nothing could be simpler. TIP You may notice that ColdFusion MX 7 allows you to weight ColdFusion servers for situations where you have systems with different resourcessuch as one server that has four CPUs and 4 GB of memory, compared with a server that has two CPUs and one gig of data. You can give the four-CPU server a higher weight, which will make the ColdFusion MX 7 Load Balancer refer a large percentage of server requests to that server. |