7 Using Dynamic Clusters

A dynamic cluster is a cluster that contains one or more dynamic servers. A dynamic server is a server instance that gets its configuration from a server template. This is in contrast to Managed Servers, which require you to configure each server individually.

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.

Why Do You Use Dynamic Clusters?

With dynamic clusters, you can easily scale up your cluster when you need additional server capacity by simply starting one or more of the preconfigured dynamic server instances. You do not need to manually configure a new server instance and add it to the cluster or perform a system restart.

How Do Dynamic Clusters Work?

You set the number of managed server instances that you want, and create or select a template for them.

Creating and Configuring Dynamic Clusters

To create a dynamic cluster, you need to complete three steps in the Configuration Wizard.

  • Specify the number of server instances you anticipate needing at peak load.

  • Create or select the server template that you want to base server configuration on.

  • Define how WebLogic Server should calculate server-specific attributes.

WebLogic Server then generates the number of dynamic server instances you specified and applies the calculated attribute values to each dynamic server instance.

Note:

Ensure you have the performance capacity to handle the maximum number of server instances you specify in the dynamic cluster configuration. For design and deployment best practices when creating a cluster, see Clustering Best Practices.

Using Server Templates

Server templates define common configuration attributes that a set of server instances share. Dynamic clusters use server templates for dynamic server configuration.

See Server Templates in Understanding Domain Configuration for Oracle WebLogic Server.

Calculating Server-Specific Attributes

You cannot configure individual dynamic server instances or override server template values at the dynamic server level when using a dynamic cluster. Server-specific attributes, such as server name, machines, and listen ports, must be calculated using the values you set when creating the dynamic cluster.

Note:

You must set a unique Listen Address value for the Managed Server instance that will host the JTA Transaction Recovery service. Otherwise, the migration fails.

WebLogic Server calculates and applies these server-specific attributes using the dynamic server instance ID:

  • Server name

  • (Optional) Listen ports (clear text and SSL)

  • (Optional) Network access point listen ports

  • (Optional) Machines or virtual machines

Calculating Server Names

The Server Name Prefix controls the calculated server name.

Server names are the prefix that you enter, followed by the index number. For example, if the prefix is set to dyn-server-, then the dynamic servers have the names dyn-server-1, dyn-server-2, and so on for the number of server instances you specified.

Calculating Listen Ports

Calculating Listen Ports specifies whether listen ports for the server are calculated.

If you do not calculate listen ports when creating your dynamic cluster, WebLogic Server uses the value in the server template. If you don’t define listen ports in the dynamic cluster configuration or server template, WebLogic Server uses the default value.

If you define a base listen port for your dynamic cluster in the server template or the dynamic cluster configuration, the listen port value for the first dynamic server instance is the base listen port incremented by one. For each additional dynamic server instance, the listen port value increments by one. If the default base listen port is used, WebLogic Server increments the hundreds digit by one and continues from there for each dynamic server instance.

Calculating Machine Names

The Calculated Machine Names and Machine Name Match Expression control how server instances in a dynamic cluster are assigned to a machine.

If you select the Calculated Machine Names option, you can use the Machine Name Match Expression to choose the set of machines used for the dynamic servers. If you don’t set Machine Name Match Expression, then all machines in the domain are selected. Assignments are made using a round robin algorithm.

The following table shows examples of machine assignments in a dynamic cluster.

Table 7-1 Calculating Machine Names

Machines in Domain Machine Name Match Expression Configuration Dynamic Server Machine Assignments

M1, M2

Not set

dyn-server-1: M1

dyn-server-2: M2

dyn-server-3: M1

...

Ma1, Ma2, Mb1, Mb2

Ma1, Mb*

dyn-server-1: Ma1

dyn-server-2: Mb1

dyn-server-3: Mb2

dyn-server-4: Ma1

...

Creating Dynamic Clusters in a High Availability Topology

You can create dynamic clusters to scale out a high availability topology.

Before you create dynamic clusters, verify the following:

  • Oracle Fusion Middleware Infrastructure and the product software are installed.

  • Product schemas are created in the database.

To create dynamic clusters for a high availability topology:
  1. Go to the bin directory.

    On UNIX operating systems:

    ORACLE_HOME/oracle_common/common/bin

    On Windows operating systems:

    ORACLE_HOME\oracle_common\common\bin

    where ORACLE_HOME is your 12c (12.2.1.3.0) Oracle home.

  2. Launch the Configuration Wizard:

    On UNIX operating systems:

    ./config.sh
    

    On Windows operating systems:

    config.cmd
  3. On the Configuration Type screen, select Create a new domain
  4. On the Templates screen, enter a name for the template you are creating. Select Next. Continue with the Configuration Wizards screens to follow the typical steps to create a cluster, until you reach the Managed Servers screen.
    If you need information on the steps to create a cluster starting with the Application Location screen (the screen after Templates in the Configuration Wizard), see your product’s installation guide.
  5. (Optional) When you reach the Managed Servers screen, you can delete static Managed Servers if you want to create a domain with dynamic Managed Servers only. To do this, select the static Managed Servers that you don't want in the domain then select Delete. (Don’t select the Managed Servers that were already listed.) Click Next.
  6. On the Clusters screen, select Add. Enter a name for the cluster and values for Frontend HTTP Port and Frontend HTTPS Port. Select product-DYN-CLUSTER in the Dynamic Server Groups drop down menu. Select Unspecified if a dynamic server group is not listed.
  7. The Server Templates screen shows templates available for the domain. In the Cluster drop down menu, select the cluster that each server template belongs to.
  8. In the Dynamic Servers screen, you customize the cluster you just created. Enter 2 as the Maximum Dynamic Server Count value. This is the typical number of servers for your first cluster.
  9. Select Calculated Machine Names and enter a value for Machine Name Match Expression to control how server instances in a dynamic cluster are assigned to a machine.
    • You must select Calculated Machine Names to assign dynamic servers to a specific machine.
    • To choose the set of machines that dynamic servers use, enter a value for Machine Name Match Expression. If you don’t enter a value for Machine Name Match Expression, all machines in the domain are selected and a round robin method assigns machines.

      If you enter a name, each specified value matches a machine name exactly. Enter a trailing asterisk (*) suffix to match multiple machine names, for example, SOAHOST* or WCPHOST*

      If the Machine Name Match Expression is a tag, each specified value matches all machines that have those tag values.

  10. Select Calculated Listen Ports.
  11. Select Dynamic Cluster.
  12. Click Next.
    The Assign Servers to Clusters screen opens. In remaining Configuration Wizard screens, you continue to create a domain as you would create a typical domain. See Assigning Managed Servers to the Cluster for information on this screen.

Expanding or Reducing Dynamic Clusters

When you create a dynamic cluster, WebLogic Server generates the number of dynamic servers you specify. Before you decide upon the number of server instances, ensure you have the performance capacity to handle the desired number.

The dynamic server instances are based on the configuration you specified in the server template and calculated attributes.

  • To expand your cluster, start any number of the preconfigured dynamic servers.

  • To shrink your dynamic cluster, shut down the excess number of dynamic servers.

If you need additional server capacity on top of the number of server instances you originally specified, increase the maximum number of dynamic servers in the dynamic cluster configuration. To reduce the number of server instances in the dynamic cluster, decrease the value of the maximum number of dynamic servers attribute. Before lowering this value, shut down the server instances you plan to remove.