3 Requirements for Configuring Elasticity

This chapter lists and describes the requirements for configuring elasticity in WebLogic Server 12.2.1, including provisioning machines and creating and configuring a dynamic cluster.

This chapter includes the following sections:

Configuring Dynamic Clusters

Elasticity is only available for use with dynamic clusters. Before configuring elastic scaling, you must create and configure a dynamic cluster. For more information on creating and configuring dynamic clusters, see "Creating and Configuring Dynamic Clusters" in Administering Clusters for Oracle WebLogic Server.

Table 3-1 explains the DynamicServersMBean attributes that are used to configure a dynamic cluster for elasticity.

Table 3-1 Attributes for Configuring Elasticity in Dynamic Clusters

Attribute Description

DynamicClusterCooloffPeriodSeconds

The cool-off period, in seconds, used during scaling operations. After a scaling operation is performed, subsequent requests for scaling operations will be ignored during this cool-off period. The default value is 900 and the minimum value is 0.

DynamicClusterShutdownTimeoutSeconds

The timeout period, in seconds, use while gracefully shutting down a dynamic server instance. If the dynamic server instance does not shut down before the specified timeout period, it will be forcibly shut down. The default value is 0.

DynamicClusterSize

The number of dynamic server instances allowed to be created. The minimum value for this attribute is 0 and the maximum value is 800.

IgnoreSessionsDuringShutDown

Indicates if the Elasticity Framework should ignore inflight HTTP requests while shutting down dynamic server instances during scale down operations.

MaxDynamicClusterSize

The maximum number of dynamic server instances that can be used in scaling operations. The default value for MaxDynamicClusterSize is 8. The minimum value is 0 and the maximum value is 800.

Note that if a scale up operation attempts to exceed the limit set in MaxDynamicClusterSize, the operation will not fail, but WebLogic Server will only add running dynamic server instances until this limit is reached.

MinDynamicClusterSize

The minimum number of running dynamic server instances that the Elasticity Framework will attempt to keep in the dynamic cluster during scaling operations. The default value is 1. The minimum value is 0 and the maximum value is 800.

Note that, during a scale down operation, any attempt to scale down below the limit set in MinDynamicClusterSize is not allowed. WebLogic Server will only scale down to this limit.

WaitForAllSessionsDuringShutdown

Indicates if the Elasticity Framework should wait for all persisted and non-persisted inflight HTTP sessions while shutting down dynamic server instances during scaling operations.


You can set these attributes and configure your dynamic cluster for elasticity using the WebLogic Server Administration Console, the Fusion Middleware Control component of Enterprise Manager (EM), or WebLogic Scripting Tool (WLST). For information about using the WebLogic Server Administration Console, see "Configure elasticity for a dynamic cluster" in the Oracle WebLogic Server Administration Console Online Help. For information about using Fusion Middleware Control, see "Configure clusters" in Administering Oracle WebLogic Server with Fusion Middleware Control.

Example 3-1 demonstrates how to use WLST to define dynamic cluster attributes for elasticity in an existing dynamic cluster.

Example 3-1 Configuring a Dynamic Cluster for Elasticity

startEdit()
cmo.setDynamicClusterSize(4)
cmo.setMaxDynamicClusterSize(8)
cmo.setMinDynamicClusterSize(2)
cmo.setDynamicClusterCooloffPeriodSeconds(120)
save()
activate()

Example 3-2 demonstrates how to create and configure a dynamic cluster for elasticity. This dynamic cluster is used in the policy-based scaling demonstration in Policy-Based Scaling Example.

Example 3-2 Creating and Configuring a Dynamic Cluster

edit()
startEdit()

dynCluster=cmo.createCluster(DynamicCluster)
  
  dynServers=dynCluster.getDynamicServers()
  dynServers.setServerTemplate(dynamicServerTemplate)
  dynServers.setMinDynamicClusterSize(2)
  dynServers.setMaxDynamicClusterSize(8)
  dynServers.setDynamicClusterSize(4)
  dynServers.setDynamicClusterCooloffPeriodSeconds(120)
  dynServers.setCalculatedListenPorts(true)
  dynServers.setCalculatedMachineNames(true)
  #
  # Dynamic server names will be dynamic-server-1, dynamic-server-2, ...,
  # dynamic-server-10.
  #
  dynServers.setServerNamePrefix(dynamic-server-)

save()
activate()

Configuring Policies and Actions

In policy-based scaling, a policy sets the conditions under which a scaling operation should occur. And when these conditions are met, an elastic action performs the scaling operation. To configure policy-based scaling, you must create and enable a policy, create and enable an elastic action (scale up or scale down), and assign the elastic action to the policy. For information on the Policies and Actions component of WLDF, see "Configuring Policies and Actions" in Configuring and Using the Diagnostics Framework for Oracle WebLogic Server.

Note:

To configure automated elasticity for a dynamic cluster, you must create a domain-scope diagnostic system module in which you define the scaling policies, along with their corresponding elastic actions, and then target that diagnostic module to the Administration Server.

To use the WebLogic Server Administration Console to create and configure policies and actions, see "Configure policies and actions" in the Oracle WebLogic Server Administration Console Online Help. To use Fusion Middleware Control, see "Create and configure policies and actions" in Administering Oracle WebLogic Server with Fusion Middleware Control.

Provisioning Machines

In order to configure policy-based elastic scaling, you must appropriately provision machines for the maximum necessary scale-up capacity.