Accessibility

ColdFusion Article

Frank DeRienzo

Frank DeRienzo

 

Brandon Purcell

Brandon Purcell

Implementing Multitier Hardware Load Balancing with ColdFusion MX for J2EE or JRun

Note: With the release of ColdFusion MX 6.1, Macromedia has merged the ColdFusion MX for J2EE edition with ColdFusion MX Enterprise. As a result, the features specific to ColdFusion MX for J2EE are now available with ColdFusion MX Enterprise.


The industry recognizes that hardware-based load balancing is an enterprise solution best suited to larger sites with heavy traffic. Software-based load-balancing solutions are suitable for smaller sites or when you use them as an interim solution in a growing site; for example, software-based load balancing is an economical way to move from a single-server site to a multiple-server site. As a site continues to expand, however, its increased load runs the risk of outstripping the capabilities of software-based solutions.

Software, such as ClusterCATS, MS NLB, the JRun connector and other software-based options are viable means of balancing substantial load, but heavy traffic balanced across multiple instances may demand a more robust hardware-based solution. Many combinations are possible; you could use hardware for the front while relying on the JRun connector or other means of clustering to balance traffic to the distributed application instances, as the following illustration shows.

Note: In the context of the distributed environment, "up front" or "in front" refers to the web servers while the back end refers to the application servers.

Figure 1. Using clustering to balance traffic to distributed application instances.

Figure 1. Using clustering to balance traffic to distributed application instances.

For detailed instructions on how to set up software-based load balancing in the J2EE environment, read Clustering ColdFusion MX for J2EE for JRun.

In this article, you will learn how to implement multitier hardware load balancing with ColdFusion or JRun in the J2EE environment. You will use BIG-IP to balance traffic between the web servers and the application servers. BIG-IP will also balance traffic in front of the web servers, as seen in the following illustration.

Figure 2. Using BIG-IP to balance traffic for the web servers.

Figure 2. Using BIG-IP to balance traffic for the web servers.

Interestingly, we used this same architecture for the updated macromedia.com website. This article contains an example-based procedure, which illustrates hardware-based load balancing incorporated into all layers of the distributed J2EE server environment. In this article, you’ll learn how to configure F5 BIG-IP; while Brandon and I incorporated some exclusive BIG-IP capabilities, the basic paradigm we used in the article applies to any high-end hardware load-balancing devices that you would use as either routers or bridges. For this article, BIG-IP is both in front of the web servers and between the web servers and application servers in the distributed mode. See the illustration below.

BIG IP configuration

Click the image to see an enlargement.

ColdFusion for J2EE marks the transition from ColdFusion Enterprise clusters running ClusterCATS to a ColdFusion server farm or pool running multiple instances behind multiple web servers and hardware load-balancing devices. If your website has grown beyond the management capabilities of either the software-based ClusterCATS load-balancing solution or the ColdFusion Application Manager (CFAM) with its dynamic feedback protocol solution, then J2EE topology opens up many robust solutions. By employing multiple instances of ColdFusion, J2EE is the new enterprise for ColdFusion websites.

Other industry developments add flexibility to the J2EE model outlined in this article. For example, F-5 added layer-two support with the release BIG-IP 4.1 software. With this release, BIG-IP can drop into a flat network where your hardware-based virtual server is on the same subnet as the real servers or nodes in the web server farm. This makes upgrading to BIG-IP from either ClusterCATS or older bridging hardware easier; it doesn’t require that you change your network topology. In this article, we employ the BIG-IP at layer 3, but with an interesting and helpful caveat that will become clear as you read through the article. Combining ColdFusion for J2EE running multiple instances for high availability with BIG-IP running 4.1 (or later) provides an excellent platform option when moving from a ClusterCATS cluster to a hardware-balanced server farm on any network. By implementing the following example-based procedure, you will not only build a foundational platform for a world-class enterprise website, you will be using a cutting edge solution that is robust and scalable.

There are several advantages to using hardware at both the web server and application tier.

  • Application-level aware failover using probes: Using application-level aware probes, you can detect not only that the server is available, but you can also detect whether application, database, or any other third-party components are operating properly.
  • Intelligent configurable load-balancing algorithms: Most software-based solutions use DNS round-robin or some other unintelligent load-balancing algorithm. Most hardware vendors provide many out of the box algorithms based on one or many different metrics values (CPU, connections, round trip time, and so forth) to determine server load.
  • Provides a more scalable solution, making it easier to scale by adding additional application servers: Using a hardware solution, each individual application server can be a clone. This makes it simple to add additional hardware to the pool of servers by cloning one of the servers. Then it is as simple as adding it to the available pool of servers in the hardware device.

Requirements

  • ColdFusion MX for J2EE (Try or Buy) or JRun 4 (Try or Buy)
  • Load-balancing hardware (this article uses F5 BIG-IP)

Table of Contents


About the authors

Frank DeRienzo

Prior to joining BrightTiger/Allaire/Macromedia in June 1997, Frank S. DeRienzo had a distinguished military career with the US Army Rangers and Special Forces. He is a graduate of US Army Command and General Staff College and holds an MBA from U-Mass. During his tenure with Macromedia, he has focused on high availability and scalability through website clustering and web server integration with various hardware load-balancing and content-management platforms. Currently he is part of the Macromedia MX Professional Services team.

Brandon Purcell

Brandon Purcell is a senior product support engineer at Macromedia with over seven years of experience with developing, maintaining, and supporting web-based applications. Brandon has been working with ColdFusion for over six years and has over two years of experience with J2EE and Macromedia JRun.

 

Submit feedback on our tutorials, articles, and sample applications.