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 profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

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]

Introduction to application server clustering with WebSphere Business Services Fabric

Scope, cache creation, tuning, and pitfalls

Nik Krishna (nik.krishna@us.ibm.com), Software Engineer, IBM
Author photo: Nik Krishna
Nik Krishna is a Software Engineer at IBM in Austin, Texas. His main focus is enterprise level software and service-oriented architecture. He is currently a developer on the WebSphere Business Services Fabric team.
Patrick Schneider (pmschnei@us.ibm.com), Software Engineer, IBM
Author photo: Patrick Schneider
Patrick Schneider is a Software Engineer at IBM in Austin, Texas. He currently works on the WebSphere Business Services Fabric runtime components team. Patrick is a committer on the Apache Maven project.

Summary:  Clustered deployments are essential for growing enterprises because they enhance your ability to deliver reliable and scalable SOA solutions. This article provides an overview of how to deploy and configure WebSphere® Business Services Fabric in a clustered environment.

Date:  27 Aug 2008
Level:  Intermediate
Also available in:   Chinese

Activity:  7529 views
Comments:  

Introduction

IBM® WebSphere Business Services Fabric (hereafter called Fabric) provides tooling and infrastructure for authoring, managing, and interacting with IT assets. For a thorough description of the various offerings and capabilities of Fabric, refer to the WebSphere Business Services Fabric V6.1 Developer's Guide, which is found along with documentation for related Business Process Management offerings in the IBM WebSphere Business Services Fabric V6.1 Information Center.

Clustered deployments are a must for serious enterprises. They enhance a customer's ability to deliver reliable and scalable service-oriented architecture (SOA) solutions. This article will address the basics of how to deploy and configure Fabric in clustered environments. Existing knowledge of general SOA principles, Fabric, and WebSphere Process Server (hereafter called Process Server) is assumed. Ideally, this includes familiarity with the installation of enterprise applications and configuring and installing WebSphere Application Server (hereafter called Application Server) and Process Server.


Scope of distributed capabilities

Fabric is comprised of multiple Enterprise Application Archives (EARs) and Process Server extensions that interact directly with the Service Component Architecture (SCA) runtime. Various computations performed by Fabric's runtime are cached to facilitate enhanced performance. However, making these cached computations available in a distributed manner is currently limited.

Some examples of these computations include:

  • The business context corresponding to a dynamic assembly component's invocation.
  • An expanded subscription detailing various context dimensions.
  • A selection policy derived from the invocation context and the business policy rules authored in the Composition Studio or via the Fabric SDK.
  • The endpoint selection and related endpoint statistics used in routing.

While each of the above computations are cached by Fabric in typical usage, only the cache pertaining to the first computation invocation context is currently able to be distributed. The benefits and specifics of distributing the context cache in a cluster are described in the following sections.


Manual cache creation

The automated installers for Fabric will install everything necessary for a clustered deployment on all platforms except for z/OS®. The z/OS operating system is a popular choice for clustered deployments, and the extra steps needed to set it up are easy enough. This exercise also provides a good opportunity to learn about the caches that Fabric uses.

After a successful installation of Fabric and its prerequisites:

  1. Log in to the Application Server Integrated Solutions Console (admin console). Next, navigate to the Object Cache Instances, as shown in Figure 1.

    Figure 1. Navigating to object cache instances
    Navigating to object cache instances

  2. After selecting Object cache instances, you are presented with a screen similar to Figure 2.

    Figure 2. Object cache instances
    Object cache instances

There are two items to note from Figure 2. First, the scope of the cache instances is specified in the first drop down. In this case, you are limiting the view by the Cell called "pschneider-m55Node01Cell". In general, and especially for Fabric clustering, it is important to create the object cache instances at the widest scope possible.

Second, in Figure 2 there are no existing object cache instances. Your particular install may or may not have pre-existing cache instances. However, if you are using the z/OS platform, you will not have Fabric caches. We will create four caches: context cache, endpoint selection cache, interface endpoints cache, and subscription cache.

When you create resources from this view, they are created in the level at which the current scope is specified. When creating the caches for clustering, leave the scope set to the cell in which the cluster will operate. The process for creating each cache is the same. You will create the first cache, and then provide the appropriate parameters for the final three caches. Afterwards, we will discuss what each cache does and how you can tune it.

Creating the Fabric context cache

From the cell scope, click New. You are presented with a configuration screen. Here, you only enter a few pieces of data, as shown in Figure 3.


Figure 3. Cache creation
Cache creation

Let's name the cache WBS Fabric Contexts. The name is purely descriptive, so you can use what you like. However, set the JNDI name as services/cache/wbsf.contexts.

This name is used by the Fabric runtime engine to look up the cache instance. As the name implies, this cache holds the context data. For now, leave the "Cache size" and "Default priority" with their default values of 2000 and 1, respectively.

Creating the other caches

For platforms other than z/OS, the Fabric Foundation Pack installer creates three caches that are currently unused by Fabric. Though you can safely ignore these caches, manual creation steps are described here for forward compatibility purposes.

Table 1 shows the data that needs to be entered for the remaining caches. Enter each in the same manner as above.


Table 1. Remaining cache configuration information
Cache nameJNDI nameCache sizeDefault priority
Fabric Mediation Endpoint Selection Cacheservices/cache/fabric/mediation/selection10001
Fabric Mediation Interface Endpoints Cacheservices/cache/fabric/mediation/selection1001
Fabric Mediation Subscription Cacheservices/cache/fabric/mediation/selection20001

Note that Fabric additionally creates a number of caches internally that are only accessible via Java Management Extensions (JMX). These caches are scoped to the Java Virtual Machine (JVM) within which the Fabric Engine EAR Application is executing. They are not considered stable storage. Tooling is not currently provided for affecting these caches, and operations performed upon them outside of those issued by Fabric are not supported.


Tuning caches for a clustered Fabric

Fortunately, the tuning parameters for each cache are limited. In fact, there is only one: the cache size. Let's discuss what each cache does before deciding on the appropriate values.

Context cache

The context cache holds invocation context objects for the dynamic assembler. A context, as it relates to Fabric, contains the salient aspects of the context in which a service is being invoked. These aspects are called dimensions by Fabric. An invocation may have many dimensions, such as the interface of the operation that is being invoked, the application to which the invocation belongs, and so on.

Contexts are important to the dynamic assembler because routing decisions may be altered based upon them. Further, as dynamic assembly components may be nested, multiple levels of context may be built up over multiple invocations. Because of this, you need to store and retrieve contexts efficiently.

In a non-clustered environment, the default number of contexts that the context cache can hold is 2,000. This is likely enough for a non-clustered environment, but it may not be suitable for clustered topologies, depending on the situation. Contexts are disposed after they are no longer necessary, and so the number of instances that this cache holds represents the number of concurrent invocations that are flowing through the Fabric installation.

One subtle point to keep in mind: Long-running asynchronous processes that use dynamic assembly will keep a context in the context cache for as long as the process takes to complete. In the case of a human task operation, this can be days, weeks, or longer. Give special consideration for operations such as these.

Finally, keep in mind that the setting listed here is for the entire Fabric installation, not for each dynamic assembly component. Depending on the number of transactions and the length of each process, a single dynamic assembly component can create 2,000 context instances, which fills up your cache.

The other caches

The endpoint selection, interface endpoints, and subscription caches are not yet used, so we will not tune their parameters at this time. Keep in mind that for forward compatibility, you can still create them if they do not already exist.


Disk-offload, context persistence, and cluster failures

As mentioned previously, the context data is cached in a cluster-wide cache that scales with the cluster. This cache, provided by WebSphere Application Server, is called dynacache. Dynacache is a distributed cache the enables the sharing of data between clustered application servers. It is fairly complex. For more information about dynacache, see IBM Redbook: Mastering DynaCache in WebSphere Commerce.

There are two more items to discuss pertaining to the context cache and its relation to dynacache. First, the current implementation is not designed to withstand a failure of the entire cluster. Note that if a subset of the application servers within the cluster fails, you can recover the context data. Future releases of Fabric will likely mitigate this risk, perhaps with full context persistence.

Second, you may notice the disk-offload feature during the configuration of the cache instance. By default, this feature is not enabled. Do not confuse the disk-offload feature with persistence. You can use it when the amount of data to be stored in the cache exceeds the main memory of the application server systems. Because data is replicated across the cluster, each server in the cluster has enough main memory to store the entire context data. If this is not the case, disk-offload can help move less-often accessed context data to and from disk-based storage. Again, this is not a persistence feature; this is a memory management feature.


Conclusion

Using WebSphere Business Services Fabric in a clustered environment is straightforward, requiring minimal intervention from the user. This article described how to deploy and configure Fabric in such an environment. It also covered how to correctly tune the applicable caches. Clustering WebSphere Business Services Fabric can help you deliver reliable and scalable SOA solutions in your enterprise deployment.


Resources

About the authors

Author photo: Nik Krishna

Nik Krishna is a Software Engineer at IBM in Austin, Texas. His main focus is enterprise level software and service-oriented architecture. He is currently a developer on the WebSphere Business Services Fabric team.

Author photo: Patrick Schneider

Patrick Schneider is a Software Engineer at IBM in Austin, Texas. He currently works on the WebSphere Business Services Fabric runtime components team. Patrick is a committer on the Apache Maven project.

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 profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

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

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Business process management, WebSphere
ArticleID=333028
ArticleTitle=Introduction to application server clustering with WebSphere Business Services Fabric
publish-date=08272008