Steadfast Blog

OnApp 2.2: VM Auto-scaling and Load Balancing

Posted in General, Customers, Software on September 6th, 2011

On August 25, 2011 we upgraded the Steadfast Cloud Platform to version 2.2 of OnApp. With this new version two new major features were introduced; VM Auto-Scaling and Load Balancing.

What is VM Auto-Scaling

VM Auto-Scaling is an important feature of instant expandability in the cloud. It allows your VM to dynamically adjust your resource needs without having to log in and make the change by hand. This is important because often times you may not be immediately available to make a change; vacations, sleep, movie theaters or even something as simple as driving your car could leave you without internet and as such the ability to make the changes necessary to keep your infrastructure online.

How can I enable and configure VM Auto-Scaling on my VMs?

VM resources are scaled based on rules you specify. For example, you can set up a rule that will add 1000MB of memory to a VM if RAM usage has been above 90% for the last 10 minutes - but add no more than 5000MB in total in 24 hours.

To configure auto-scaling:

1. Go to your Control Panel’s Virtual Machines menu.

2. Click the label of the appropriate VM.

3. On the page that follows, click the auto-scaling tab.

4. Add auto-scaling rules, explained below:

• If RAM usage exceeds  X% for a specific time period, add Y MB – but no more than Z MB in a 24 hour period.

• If CPU usage exceeds X % for a specific time period, add Y% - but no more than Z% in a 24 hour period.

• If disk usage exceeds X % for a specific time period, add Y GB - but no more than Z GB in a 24 hour period.

5. Click Apply.

To delete an auto-scaling rule:

1. Go to your Control Panel’s Virtual Machines menu.

2. Click the label of the appropriate VM.

3. On the page that follows, click the auto-scaling tab.

4. Click Delete. This will delete all auto-scaling rules

What is Load Balancing?

Load Balancing allows for you to spread connections for various applications between multiple VM’s. This allows you to add additional infrastructure redundancy and capacity between VM’s on different Hypervisors.

How can I enable and configure Load Balancing?

For a Cluster Load Balancing configuration:

1. Go to your Control Panel’s Load Balancers menu

2. Click Add a balancer button

3. On the page that follows, fill in the form that appears:

Cluster Configuration

Port - specify the port for this load balancer to run on (e.g. 80,21,22 etc.)

Load Balancer Instance

  • Label – give a name for your load balancer instance
  • Hostname – specify a host name that will identify your load balancer
  • Port Speed – use the slider to set a port speed or tick the Unlimited box if required

Load Balancer Type

  • Choose the Cluster option – cluster

Cluster Nodes

This is where you add and configure the nodes in this load balancing cluster. A node is a combination of a VM and an IP address.

Virtual Machines – select a virtual machine from the drop-down box.

4. Click Save.

For auto-scaling load balancing cluster:

1. Go to your Control Panel’s Load Balancers menu

2. Click Add a balancer button

3. On the page that follows, fill in the form that appears:

Cluster Configuration

Port - specify the port for this load balancer to run on (e.g. 80,21,22 etc.)

Load Balancer Instance

  • Label – give a name for your load balancer instance
  • Hostname – specify a host name that will identify your load balancer
  • Port Speed – use the slider to set a port speed or tick the Unlimited box if required

Load Balancer Type

  • Choose the Cluster option – auto-scaling

Cluster Node Template

These settings configure the nodes that will be added to your cluster.

  • Image template -  choose a template from the drop-down box: nodes will be built on this template
  • Min node amount – the minimum number of nodes in this cluster
  • Max node amount – the maximum number of nodes in this cluster

Example: if you set Min node amount = 2 and Max node amount = 5, then the system will scale out the cluster up to 5 nodes, and scale in to 2 nodes if required.

Cluster Node Parameters

These are the settings for each node of a cluster. Each node added to a cluster will have the following parameters:

  • Memory – set the amount of memory allocated per node in Mb
  • CPUs – set the amount of CPUs which will form each node
  • CPU Priority – specify CPU priority. For more info on CPU priority, refer to Create VMs section
  • Rate Limit – set the port speed for a node

Autoscale Out Parameters

Set the rules for adding more nodes to your autoscaling cluster. The system will monitor CPU and free RAM of the nodes.

  • Specify the period of monitoring (e.g. 10 minutes)
  • Value (e.g. CPU usage is above 85%; free RAM is less then 10 MB)
  • Number of nodes to be added to the cluster if the rule is met (e.g. add 1 more VMs).

Note: If the rule is met, the system will add nodes until the limit set in the Max node amount field is reached. In case both rules are met simultaneously (if you set the same monitoring period for both CPU and RAM), the system will add only one node.

Autoscale In Parameters

Set the rules for removing nodes from your autoscaling cluster. The system will monitor CPU and free RAM of the nodes.

  • Specify the period of monitoring (e.g. 20 minutes)
  • Value (e.g. CPU usage is less then 55%; free RAM is more then 50 MB)
  • Number of nodes to be removed from the cluster if the rule is met (e.g. remove 1 more VMs).

Note: If the rule is met, the system will remove nodes until the limit set in the Min node amount field is reached. In case both rules are met simultaneously (if you set the same monitoring period for both CPU and RAM), the system will remove only one node.

4) Click Save.

Overall built in load balancing provides you with another excellent tool to expand your infrastructure from within the Steadfast Cloud Platform.

1 comment

Comment from: Anand J [Visitor]
Anand Jeverything is fine as mentioned above. but is it possible to scale the virtual machine dynamically without shutting down it?
guide for this.
01/09/13 @ 23:47

Leave a comment

You must be logged in to leave a comment. Log in now!

If you have no account yet, you can register now... (It only takes a few seconds!)