5 WebLogic Server Clustering

The foundation of high availability in WebLogic Server is the cluster. A WebLogic Server cluster is a group of WebLogic Server instances running simultaneously and working together to provide increased scalability and reliability.

This chapter includes the following topics:

Overview of WebLogic Server Clusters

The server instances that constitute a cluster can run on the same machine, or be distributed across multiple machines. A cluster appears to clients to be a single WebLogic Server instance. You can increase a cluster's capacity by adding additional server instances to the cluster on an existing machine, or you can add machines to the cluster to host the incremental server instances. Each server instance in a cluster must run the same version of WebLogic Server.

Relationship Between Clusters and Domains

A cluster is part of a particular WebLogic domain. A domain includes one or more WebLogic Server instances. In a domain with multiple server instances, those servers can be clustered, nonclustered, or a combination of clustered and nonclustered instances.

A domain can include multiple clusters. A domain also contains the application components deployed in the domain, and the resources and services required by those application components and the server instances in the domain. Examples of the resources and services used by applications and server instances include machine definitions, optional network channels, connectors, and startup classes.

You can use a variety of criteria for organizing WebLogic Server instances into domains. For instance, you might choose to allocate resources to multiple domains based on logical divisions of the hosted application, geographical considerations, or the number or complexity of the resources under management. For additional information about domains see Understanding Oracle WebLogic Server Domains in Understanding Domain Configuration for Oracle WebLogic Server.

In each domain, one WebLogic Server instance acts as the Administration Server—the server instance which configures, manages, and monitors all other server instances and resources in the domain. Each Administration Server manages one domain only. If a domain contains multiple clusters, each cluster in the domain has the same Administration Server. All server instances in a cluster must reside in the same domain; you cannot "split" a cluster over multiple domains. Similarly, you cannot share a configured resource or subsystem between domains.

Clustered WebLogic Server instances behave similarly to nonclustered instances, except that they provide failover and load balancing. The process and tools used to configure clustered WebLogic Server instances are the same as those used to configure nonclustered instances. However, to achieve the load balancing and failover benefits that clustering enables, you must adhere to certain guidelines for cluster configuration.

Relationship Between Coherence and WebLogic Server Clusters

Similar to WebLogic Server clusters, Coherence clusters consist of multiple managed Coherence server instances that work together to distribute data in-memory to increase application scalability, availability, and performance. However, Coherence clusters use different clustering protocols and are configured separately from WebLogic Server clusters.

With Coherence clusters, a client interacts with the data in a local cache, and the distribution and backup of the data is automatically performed across cluster members.

A WebLogic Server domain can contain a single Coherence cluster. Multiple WebLogic Server clusters can be associated with a Coherence cluster.

For details on configuring and managing Coherence clusters, see Administering Clusters for Oracle WebLogic Server.

Benefits of Clustering

Clustering provides two key benefits: scalability and high availability. A WebLogic Server cluster provides the following benefits:
  • Scalability

    The capacity of an application deployed on a WebLogic Server cluster can be increased dynamically to meet demand. You can add server instances to a cluster without interruption of service—the application continues to run without impact to clients and end users.

  • High availability

    In a WebLogic Server cluster, application processing can continue when a server instance fails. You cluster application components by deploying them on multiple server instances in the cluster—so, if a server instance on which a component is running fails, then another server instance on which that component is deployed can continue application processing.

Key Capabilities of Clusters

A WebLogic cluster has three key capabilities that enable its primary benefits: failover, migration, and load balancing. The key clustering capabilities that enable scalability and high availability include the following:
  • Application failover

    If an application component that is doing a particular set of operations becomes unavailable for any reason, then a copy of the failed application component finishes those operations.

  • Migration

    WebLogic Server supports automatic and manual migration of a clustered server instance from one machine to another. A Managed Server that can be migrated is referred to as a migratable server. This feature is designed for environments with requirements for high availability.

  • Load balancing

    Load balancing is the even distribution of jobs and associated communications across the computing and networking resources in your environment.

Objects That Can Be Clustered

A clustered application or application component is one that is available on multiple WebLogic Server instances in a cluster. Knowing what objects can be clustered is key to understanding how objects should be deployed throughout your domain. If an object is clustered, failover and load balancing for that object is available. To simplify cluster administration, maintenance, and troubleshooting, make sure that you deploy objects homogeneously; that is, to every server instance in your cluster.

Web applications can consist of different types of objects, including Enterprise Java Beans (EJBs), servlets, and Java Server Pages (JSPs). Each object type has a unique set of behaviors related to control, invocation, and how it functions within an application. For this reason, the methods that WebLogic Server uses to support clustering—and hence to provide load balancing and failover—can vary for different types of objects. The following types of objects can be clustered in a WebLogic Server deployment:

  • Servlets

  • JSPs

  • EJBs

  • Remote Method Invocation (RMI) objects

  • Java Messaging Service (JMS) destinations

  • Coherence cluster and managed Coherence servers

  • Timer services

  • Batch applications

About Dynamic Clusters

Dynamic clusters consist of server instances that can be dynamically scaled up to meet the resource needs of your application. A dynamic cluster uses a single server template to define configuration for a specified number of generated (dynamic) server instances.

When you create a dynamic cluster, the dynamic servers are preconfigured and automatically generated for you, enabling you to easily scale up the number of server instances in your dynamic cluster when you need additional server capacity. You can simply start the dynamic servers without having to first manually configure and add them to the cluster.

If you need additional server instances on top of the number you originally specified, you can increase the maximum number of servers instances (dynamic) in the dynamic cluster configuration or manually add configured server instances to the dynamic cluster. A dynamic cluster that contains both dynamic and configured server instances is called a mixed cluster.

The following table defines terminology associated with dynamic clusters:

Term Definition

dynamic cluster

A cluster that contains one or more generated (dynamic) server instances that are based on a single shared server template.

configured cluster

A cluster in which you manually configure and add each server instance.

dynamic server

A server instance that is generated by WebLogic Server when creating a dynamic cluster. Configuration is based on a shared server template.

configured server

A server instance for which you manually configure attributes.

mixed cluster

A cluster that contains both dynamic and configured server instances.

server template

A prototype server definition that contains common, non-default settings and attributes that can be assigned to a set of server instances, which then inherit the template configuration. For dynamic clusters, the server template is used to generate the dynamic servers. See Server Templates in Understanding Domain Configuration for Oracle WebLogic Server.

For more information about dynamic clusters, see Dynamic Clusters in Administering Clusters for Oracle WebLogic Server.

Roadmap for Clustering in WebLogic Server

The WebLogic Server documentation set includes several introductory, procedural, and reference topics, including examples, that help you understand how to configure and manage WebLogic clusters.