This chapter includes the following sections:
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 |
---|---|
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 |
|
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 |
|
The initial number of dynamic server instances to be provisioned in the dynamic cluster. The minimum value for this attribute is |
|
Indicates if the Elasticity Framework should ignore inflight HTTP requests while shutting down dynamic server instances during scale down operations. |
|
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 Note that if a scale up operation attempts to exceed the limit set in |
|
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 Note that, during a scale down operation, any attempt to scale down below the limit set in |
|
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-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-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 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()
To use the WebLogic Server Administration Console to create and configure policies and actions in a diagnostic system module, 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.
After you have defined the policies and elastic scaling actions in a diagnostic system module, you must target that diagnostic system module to the Administration Server.
Some of the smart rules and scaling actions used for elasticity must execute from the Administration Server so that they can have visibility across the dynamic cluster. As a result of this, diagnostic system modules intended for elastic scaling of dynamic clusters must be targeted to the Administration Server. If such a module is targeted to the cluster itself, or to an individual Managed Server, errors are generated and the policies and actions are consequently ignored by WLDF.