Server Scaling

CLI Tutorial: Server Scaling

After an environment has been created, its topology can be changed through the platform CLI to scale a specific server vertically, scale an entire layer horizontally, or combine both approaches.

Change Environment Topology

Use the changetopology method to update the configuration of an existing environment:

~/jelastic/environment/control/changetopology --envName {env_name} --env '{"engine" : "{engine_type}"}' --nodes ['{"nodeType" : "{node_type}", "count" : {nodes_amount}, "fixedCloudlets" : {cloudlets_amount}, "flexibleCloudlets" : {cloudlets_amount}}, {"nodeType" : "{node_type}", "count" : {nodes_amount}, "fixedCloudlets" : {cloudlets_amount}, "flexibleCloudlets" : {cloudlets_amount}}']
Platform CLI change topology command
Use the changetopology method to update the node count and Cloudlet allocation.
The available topology parameters are generally the same as for the createenvironment method. The additional --envName parameter identifies the already existing environment that must be changed.

Scaling Parameters

{env_name} Name of the existing environment that should be reconfigured.
{engine_type} Required engine used by the selected environment instances.
{node_type} Software stack identifier for the node type being adjusted.
{nodes_amount} Number of nodes that should exist in the selected layer.
{cloudlets_amount} Number of fixed or flexible Cloudlets allocated to the specified node type.

Vertical Scaling

Vertical scaling changes the resource limits of a node. In the CLI command, it is controlled through the Cloudlet parameters:

  • fixedCloudlets — guaranteed reserved resources.
  • flexibleCloudlets — additional resources available according to load and configured limits.
Vertical scaling: Increase or decrease the fixed and flexible Cloudlet values to adjust the resource capacity of the selected server type.

Horizontal Scaling

Horizontal scaling changes the number of nodes in an environment layer. Set the required value through the count parameter.

Horizontal scaling: The count value defines how many nodes should be available for the selected layer after the topology update.

Load Balancer Requirement

For a horizontally scaled application-server layer to work correctly, add a load-balancing node to the environment topology when one is not already present.

The load balancer distributes incoming requests across the application-server nodes and provides a single entry point for the scaled layer.

Reconfiguration Time

Updating the environment topology can take several minutes. Wait until the platform finishes the reconfiguration before testing the scaled environment or running another topology operation.

  • Confirm that the CLI command completed successfully.
  • Wait until all required nodes show the running state.
  • Verify application availability after the scaling operation.
  • Check load balancing when the application layer has multiple nodes.

What’s next?