4 On-Demand Scaling

This chapter describes on-demand scaling which allows you scale up or scale down a dynamic cluster in WebLogic Server 12.2.1 by manually adding or removing running dynamic server instances as needed.

This chapter includes the following sections:

What is On-Demand Scaling?

On-demand scaling allows you to manually add or remove running dynamic server instances from an active dynamic cluster as needed. For example, if the average user-request backlog in dynamic cluster members is trending up, indicating a need for higher processing capacity, you can add running dynamic server instances to the dynamic cluster. When the backlog for user-requests drops substantially, you can shut down idle dynamic server instances.

To perform on-demand scaling, you must have a dynamic cluster configured. For more information, see "Dynamic Clusters" in Administering Clusters for Oracle WebLogic Server.

You can perform on-demand scaling using the WebLogic Server Administration Console, Fusion Middleware Control, or WLST, as described in the following sections:

Note:

Before performing on-demand scaling of a dynamic cluster, make sure that the scaling operation will not have adverse effects on the rest of the system. For example, before a scale up, it may be necessary to adjust JDBC connection pool sizes and Work Manager parameters to avoid exceeding database capacity. Before a scale down, make sure that any inflight work has a chance to finish before the dynamic server instances are shut down.

On-Demand Scaling Using the WebLogic Server Administration Console

To perform on-demand scaling using the WebLogic Server Administration Console:

  1. In the left navigation pane, select Environment > Clusters.

  2. In the Clusters table, select the name of the dynamic cluster you want to scale up or scale down.

  3. Select Control > Scaling.

  4. In the Desired Number of Running Servers field, enter the number of running dynamic server instances you want in the dynamic cluster.

  5. Click Ok.

For more information, see "Perform on-demand scaling for a dynamic cluster" in the Oracle WebLogic Server Administration Console Online Help.

On-Demand Scaling Using Fusion Middleware Control

To perform on-demand scaling using Fusion Middleware Control:

  1. From the WebLogic Domain dropdown menu, select Environment, then select Clusters.

  2. In the Clusters table, select the row of the dynamic cluster you want to scale up or scale down.

  3. Click the Scale Up/Down button.

  4. On the Scale Up/Down page, you can review current dynamic cluster settings. In the Desired Server Count field, use the arrows to set the number of dynamic server instances you want running in this dynamic cluster. Click Scale Up/Down to activate this setting. A confirmation message is displayed to notify you that your scale up or scale down operation was successful.

For more information about using Fusion Middleware Control to manage WebLogic Server, see Administering Oracle WebLogic Server with Fusion Middleware Control.

On-Demand Scaling Using WLST

To manually scale your dynamic cluster using WLST:

  • Use the scaleUp command to increase the number of running dynamic servers in your dynamic cluster. When you use the scaleUp command and enable the updateConfiguration argument, WLST will increase the maximum size of the dynamic cluster by the specified number of dynamic servers and start these server instances.

  • Use the scaleDown command to decrease the maximum size of your dynamic cluster. When you use the scaleDown command and enable the updateConfiguration argument, WLST will gracefully shut down the specified number of running dynamic servers and remove them from the dynamic cluster.

For more information on these commands, see "scaleUp" and "scaleDown" in WLST Command Reference for WebLogic Server.

For more information on expanding and reducing dynamic clusters, see "Expanding or Reducing Dynamic Clusters" in Administering Clusters for Oracle WebLogic Server.

Example 4-1 demonstrates how to use WLST to scale a dynamic cluster named DynamicCluster up by two running dynamic server instances and then scale it back down by one running dynamic server instance.

Example 4-1 On-Demand Scaling Using WLST

wls:/offline> connect('weblogic','weblogic','t3://localhost:8001')
Connecting to weblogic server instance running at t3://localhost:8001 as username weblogic...

Successfully connected to Admin Server 'AdminServer' that belongs to domain 'mydomain'.

wls:/mydomain/serverConfig/> scaleUp("DynamicCluster", 2, true ,true)
Remote ScaleUp started successfully after 38 seconds. Waiting for 2 servers to reach the running state.  The timeout is 600 seconds.

All servers are now running.
wls:/mydomain/serverConfig/> scaleDown("DynamicCluster", 1, true ,true)
Remote ScaleDown started successfully after 0 seconds.
The servers were stopped successfully.