Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

IBM WebSphere Developer Technical Journal: Clustering Macromedia ColdFusion MX for IBM WebSphere Application Server

Michael Morton (mortonmj@us.ibm.com.), Product Development, WebSphere Application Server, IBM Raleigh Lab
Photo of Michael Morton
Michael Morton is a Senior Software Engineer at the IBM Research Triangle Park in North Carolina, and is an original member of the IBM WebSphere Application Server development team. His current assignments include being a product development architect for IBM WebSphere Application Server Base and Network Deployment Editions, and lead engineer responsible for the joint efforts between IBM and Macromedia. You can contact Michael at mortonmj@us.ibm.com.

Summary:  The article demonstrates how to configure a WebSphere Application Server server group with clones, where each clone has Macromedia ColdFusion MX for IBM WebSphere installed. The article shows how to configure a horizontally cloned environment using the Administrative Console.

Date:  15 Jan 2003
Level:  Intermediate

Activity:  2448 views
Comments:  

© Copyright International Business Machines Corporation 2003. All rights reserved.

Introduction

Macromedia® ColdFusion MX for IBM ® WebSphere® (hereafter called ColdFusion MX) provides an easy-to-learn markup language, CFML, that you can use to build powerful Internet applications. With this new ColdFusion MX offering, developers can now execute ColdFusion MX applications on IBM WebSphere Application Server Advanced Edition V4 (hereafter called Application Server). Application Server provides ColdFusion applications not only with a J2EETM environment, but also with WebSphere-specific functions and services, including cloning technology.

Cloning technology lets you configure clusters of application servers. In Application Server administration terms, a cluster is a server group that contains clones, where each clone represents an application server instance. A server group has a method that enables identical instances of application servers to contain the same enterprise applications. These enterprise applications can execute concurrently on either the same machine or remote machines. This type of configuration provides the following benefits:

  • Performance and scaling. Additional clones provide increased throughput for applications. As client request demands change for particular applications, you can add and remove clones or take them online and offline to adjust to these demands. The result is that you keep the environment optimized to fulfill client requests in a timely manner.
  • Reliability and failover. In the event that there is planned or unplanned downtime for machines in a cluster, request routers will continue to route client requests to only the clones that are available in the cluster. In addition, as application server clones are brought back online, requests will once again start routing requests to these clones.
  • Load balancing and workload management. Client requests are automatically distributed across all application server clones in a cluster. Using the clones efficiently maximizes the performance of the resources in the environment.

Creating multiple application server clones on a single machine is commonly referred to as vertical scaling. Vertical scaling enables more efficient use of a machine's processing power. An instance of an application server runs in a single JavaTM Virtual Machine (JVM) process. However, in some cases, the inherent concurrency limitations of a JVM process prevents it from fully using the machine's processing power. Creating additional JVM processes lets each process manage its own thread pools, thereby reducing contention and concurrency issues.

Although vertical scaling can allow for a higher level of efficiency of a machine's processing power, it provides only a certain level of failover. If multiple clones are configured on the same machine, users will continue to get their requests serviced in the event that a JVM process goes down. However, in the event that there is total machine failure, no application server instances will be available.

Creating application server clones on multiple machines is commonly referred to as horizontal scaling. This type of configuration provides the highest level of scaling and failover.

It is also fairly common for environments to contain a mix of vertical and horizontal scaling.


Overview

This article provides step-by-step instructions on how to configure a WebSphere Application Server server group with clones, where each clone has ColdFusion MX installed. Using the WebSphere Application Server Administrative Console, the article demonstrates how to configure a horizontally cloned environment. Figure 1 depicts the environment that you will configure by walking through the sample below:


Figure 1. The configured environment
Graphic of the configured environment

Figure 1 shows the Application Server installed on two machines whose names are mjmnet and blabwin1, where each machine respectively contains an application server clone CFMX Server1 and CFMX Server2 that comprise the server group, CFMX Cluster. Again, each of these clones has ColdFusion MX installed. In addition, IBM HTTP Server, installed on a separate machine, ihs, will route HTTP requests to both application server clones.

For simplicity, it is assumed that both mjmnet and blabwin1 use a database installed on mjmnet for the Application Server administrative database.


Walking through the sample

Complete the following steps to configure the environment depicted in Figure 1 above:

It is assumed that IBM HTTP Server and WebSphere Application Server are already installed on the machines, and that ColdFusion MX is already installed on one of the WebSphere installations.

Step 1: Renaming the ColdFusion MX enterprise application

For this example, ColdFusion MX is installed on the mjmnet machine; the article refers to this machine as the originator node machine.

ColdFusion MX is installed on the application server, Default Server, by default. Default Server already has one enterprise application called sampleApp installed. You do not need to include this application when creating the application server clones for ColdFusion MX.

Use the WebSphere Advanced Administrative Console to remove the sampleApp application from the originator node. Right-click mjmnet_sampleApp, and select Remove.


Figure 2.
Screen capture of the WebSphere Administrative Console with Remove selected on mjmnet_sampleApp

The mjmnet machine is where ColdFusion MX was initially installed and is comprised of the enterprise applications, mjmnet/CFusion and mjmnet/CFIDE.

In the WebSphere Administrative Console, rename the applications to cfusion and rds, respectively (see Figure 3):


Figure 3.
Screen capture of the WebSphere Administrative Console open to the Enterprise Applications General tab view

Step 2: Creating a server group

Use the WebSphere Administrative Console to rename the Default Server on the originator node, mjmnet, to CFMX Server1 for clarity. In the Administrative Console, select Default Server. In the General tab view, enter CFMX Server1 as the name of the application server.


Figure 4.
Screen capture of the WebSphere Administrative Console open to the CFMX Server1 General tab view

Create a server group and make CFMX Server1 the first member clone. In the WebSphere Administrative Console, right-click CFMX Server1, and select Create Server Group.


Figure 5.
Screen capture of the WebSphere Administrative Console with Create Server Group selected on CFMX Server1

The Server Group Properties dialog opens. In the Server Group name field, enter CFMX Cluster. Click OK.


Figure 6.
Screen capture of the Server Group Properties dialog box

Step 3: Creating a new application server clone

Create a second application server clone on a remote machine. For this example, the new clone, CFMX Server2, is created on machine, blabwin1.

This step is the same as creating a new clone on the same machine for configuring a vertical scaling environment.

In the WebSphere Administrative Console, right-click on CFMX Cluster, and select New => Clone (see Figure 7):


Figure 7.
Screen capture of the WebSphere Administrative Console with New, Clone selected on the CFMX Cluster

The Create Clone dialog opens. In the Name field, enter CFMX Server2. In the Node to install server on field, enter blabwin1. Click Create.


Figure 8.
Screen capture of the Create Clone dialog box

The new clone is now created on machine, blabwin1.


Figure 9.
Screen capture showing the new clone created on the machine blabwin1

Step 4: Making necessary directory changes

When a new application server clone is created, it models all of the properties of the first application server clone in the server group. Therefore, depending on the operating system and the location of the WebSphere Application Server installation on the remote machine where a new clone has been created, you might need to modify some of the directories of certain files. In this example, the Application Server was installed in D:\WebSphere404\AppServer on the mjmnet machine, while on the blabwin1 machine, the Application Server was installed in C:\WebSphere404\AppServer. Therefore, you will need to modify any paths in the configuration of CFMX Server2 that point to D:\WebSphere404\AppServer to instead specify the correct path for the blabwin1 machine.

One directory that you need to update is the working directory of the CFMX Server2, which is located in the General tab view. Figure 10 below provides a view of the General tab with an updated working directory value for CFMX Server2. For this example, the value was changed from D:\WebSphere404\AppServer\bin to C:\WebSphere404\AppServer\bin.


Figure 10.
Screen capture of the WebSphere Administrative Console open to the General tab view showing an updated working directory value for CFMX Server2

You also need to modify the location of the standard out and standard error directories which are located in the File tab view of CFMX Server2. Figure 11 below provides a view of the File tab with updated standard out and standard error file directories for CFMX Server2. For this example, the values were changed from D:\WebSphere404\AppServer\logs\Default_Server_stdout.log to C:\WebSphere404\AppServer\logs\Default_Server_stdout.log and from D:\WebSphere404\AppServer\logs\Default_Server_stderr.out to C:\WebSphere404\AppServer\logs\Default_Server_stderr.log.


Figure 11.
Screen capture of the WebSphere Administrative Console open to the File tab view showing the updated standard out and standard error file directories for CFMX Server2

Step 5: Copying all enterprise applications to the remote machine

When a new clone is created, IBM WebSphere Application Server 4.0 does not automatically propagate all of the necessary enterprise applications installed on a server group to the remote machine. Therefore, you need to transfer the cfusion and rds enterprise applications to the remote machine, blabwin1, from the originator machine, mjmnet.

Using the Application Server EARExpander tool on the originator machine, mjmnet, collapse the ColdFusion MX applications, cfusion and rds, and transfer them to the remote machine, blabwin1.

For this example, run the following commands:

  1. Change the directory to the WebSphere Application Server \bin directory:

    cd D:\WebSphere404\AppServer\bin

  2. Collapse the ColdFusion MX application cfusion into a temp directory:

    EARExpander -ear D:\Workbench\tmp\cfusion.ear -expandDir D:\WebSphere404\AppServer\installedApps\cfusion.ear -operation collapse

  3. Collapse the ColdFusion MX application rds into a temp directory:

    EARExpander -ear D:\Workbench\tmp\rds.ear -expandDir D:\WebSphere404\AppServer\installedApps\rds.ear -operation collapse

Figure 12.
Screen capture of the command prompt displaying various commands being executed

Now, on the remote machine, blabwin1, use the EARExpander tool again to expand the cfusion.ear and rds.ear files into the \installedApps directory. In this case, both EAR files will be expanded into the C:\WebSphere404\AppServer\installedApps directory.

For this example, run the following commands:

  1. Change directory to the WebSphere \bin directory:

    CD C:\WebSphere404\AppServer\bin

  2. Expand the ColdFusion MX application cfusion into the \installedApps directory:

    EARExpander -ear C:\Workbench\tmp\cfusion.ear -expandDir C:\WebSphere404\AppServer\installedApps\cfusion.ear -operation expand -expansionFlags war

  3. Expand the ColdFusion MX application rds into the \installedApps directory:

    EARExpander -ear C:\Workbench\tmp\rds.ear -expandDir C:\WebSphere404\AppServer\installedApps\rds.ear -operation expand -expansionFlags war

Figure 13.
Screen capture of the command prompt displaying various commands being executed

Step 6: Modifying the virtual host

Each IBM WebSphere Application Server has its own HTTP transport that receives and responds to HTTP requests. The IBM HTTP Server uses the HTTP transport to send client requests to a particular application server. This requires that each application server have a unique hostname:port value pair for communication. In the Application Server, the hostname:port value pair is configured as a host alias in a virtual host entry. There must be a host alias entry in a virtual host entry that matches the hostname:port value used by the application server HTTP transport. When creating new application server instances, WebSphere automatically allocates an available port value for the machine. However, it does not automatically update the virtual host entry when the application server is being created since the Application Server does not know which virtual host entries the applications are configured for.

ColdFusion MX by default uses the default_host virtual host entry. Therefore, when creating new application server clones that contain ColdFusion MX, you must configure any port value that was automatically allocated for the HTTP transport of a new clone as a host alias in the default_host virtual host entry. The following steps describe how to to check the configuration and make changes if necessary.

Select CFMX Server1. Click the Services tab, and select Web Container Service from the Services list. Then, click Edit Properties.


Figure 14.
Screen capture of the WebSphere Administrative Console open to the Services tab view of CFMX Server1

Figure 15 displays the Web Container Service properties panel for this example. You generally do not need to make changes to these properties. Simply take note of the host and port value that was automatically assigned to the Web Container.


Figure 15.
Screen capture of the Web Container Service dialog box

The HTTP transport hostname:port value pair of *:9081 means that this application server will accept requests for any hostname configured for this machine on port 9081. Therefore, you must also configure this value pair as a host alias in the default_host virtual host entry. In the WebSphere Administrative Console, select Virtual Hosts, then from the list of virtual host entries on the right, select default_host. Then, if an entry for *:9081 is not included in the Host Aliases, click Add, and enter the value *:9081. Click Apply.


Figure 16.
Screen capture of the WebSphere Administrative Console open to the General tab view of Virtual Hosts

Step 7: Starting the server group

The CFMX Cluster is now configured and ready to be started. Starting the server group will start all application server clones. In the WebSphere Administrative Console, select CFMX Cluster under Server Groups, and click the Start icon in the menu bar. CFMX Server1 on machine mjmnet and CFMX Server2 on machine blabwin1 will start.


Figure 17.
Screen capture of the WebSphere Administrative Console open to the General tab view of CFMX Cluster

Step 8. Generating the Web server plug-in file

Now you need to provide the configuration information of the CFMX Cluster to the Web server so that it knows where to route client requests to. This involves generating the plugin-cfg.xml file which contains the routing information that the IBM HTTP Server requires.

To manually activate the generation task, select a node, for example mjmnet, and select Regen Webserver Plugin.


Figure 18.
Screen capture of the WebSphere Administrative Console with Regen Webserver Plugin selected on the mjmnet node

The generated file is located in the \config\plugin-cfg.xml directory. In this example, the file was generated in D:\WebSphere404\AppServer\config\plugin-cfg.xml.

Typically, the Web server is located on a remote machine for a production environment, similar to what is demonstrated here, but it can reside on the same machine where an IBM Application Server is installed.

If you are using the Web server on the same machine as the IBM Application Server, and it is configured to already use the plugin-cfg.xml file located in the \config directory, then no further action is required. IBM HTTP Server will automatically recognize that the plugin-cfg.xml file has been updated, and will start using it. However, as is the case for this example, IBM HTTP Server is installed on a separate machine. Therefore, you will need to transfer the plugin-cfg.xml file to the other machine and replace it with the one that is currently being used. Once this is done, IBM HTTP Server will automatically recognize that the plugin-cfg.xml file has been updated and will start using it.


Managing ColdFusion MX applications

If user applications were already installed on the original application server where ColdFusion MX was installed prior to performing the configuration steps above for cloning, then no further steps will be necessary. All application servers in the cluster will be able to service client requests for the user applications.

However, if you decide to install, uninstall, or maintain your ColdFusion MX applications after the cloning process, you will need to make the necessary changes in each location that ColdFusion MX is installed.


Administration issues

For the scenario where you configure a vertical scaling environment ColdFusion MX, keep in mind that all application server clones are operating against the same ColdFusion MX installation location; this is comprised of the cfusion.ear and rds.ear enterprise applications located in the \installedApps directory. This means that any administration performed by using the ColdFusion administrator will take effect for any application server clone running ColdFusion MX applications on the same machine.

If you configure a horizontal scaling environment, then any change made to the ColdFusion MX environment using the ColdFusion administrator for one application server clone will also need to be made using the ColdFusion administrator on all the remote application server clones.

Using the example configured above, if you make a change using the ColdFusion MX administrator for CFMX Server1 (http://mjmnet:9080/cfmx/CFIDE/administrator/index.cfm), then you will need to make the same change to CFMX Server2 on the remote machine (http://blabwin1:9081/cfmx/CFIDE/administrator/index.cfm).

If your ColdFusion MX application uses the ColdFusion Server ODBC Server service, then refer to the ColdFusion MX documentation to learn how to configure this service on a remote machine in the event that horizontal cloning was performed.


Tuning WebSphere Application Server

For information on tuning Application Server, refer to the WebSphere Application Server Tuning Guide.


Advanced information on WebSphere Application Server workload management

This discussion on configuring a cluster of ColdFusion MX for WebSphere Application Server servers discussed how to take advantage of the IBM HTTP Server workload management, i.e., the load-balancing technology of routing HTTP client requests to multiple servers. For WebSphere Application Server 4.0, the Web server plug-in performs a round-robin selection policy (instead of a random selection policy), for determining which application server clone to send a client request to.

There is another form of workload management in the Application Server that is used for EJBs. If your ColdFusion MX application calls an EJB that is installed in a server group, then you can choose which selection policy to configure. The selection policies available include round-robin, random, round-robin prefer local, and random prefer local. Please see the WebSphere Application Server documentation for information on the available selection policies for EJB workload management.

You choose the selection policy for an EJB when the server group is being created, where the new Server Group will contain application server clones that are responsible for executing the EJB. The selection policy you choose is in effect for the EJB container on each of the application server clones configured in the server group.


Conclusion

Together, Macromedia ColdFusion MX for IBM WebSphere and IBM WebSphere Application Server provide a reliable and scalable environment for users with demanding needs. As described here in step-by-step detail, you can configure such an environment by using ColdFusion MX with Application Server's cloning technology to meet these demanding needs.


About the author

Photo of Michael Morton

Michael Morton is a Senior Software Engineer at the IBM Research Triangle Park in North Carolina, and is an original member of the IBM WebSphere Application Server development team. His current assignments include being a product development architect for IBM WebSphere Application Server Base and Network Deployment Editions, and lead engineer responsible for the joint efforts between IBM and Macromedia. You can contact Michael at mortonmj@us.ibm.com.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=14097
ArticleTitle=IBM WebSphere Developer Technical Journal: Clustering Macromedia ColdFusion MX for IBM WebSphere Application Server
publish-date=01152003
author1-email=mortonmj@us.ibm.com.
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.

Special offers