Monday, 5 August 2013

Eucalyptus 3.3 Tutorials- Getting Started with Autoscaling

Eucalyptus 3.3 Tutorials
Getting Started with Autoscaling

Eucalyptus v3.3 has recently introduced few awesome features into its Private Cloud sucah as Autoscaling, Load Balancing and Cloud Watch, which is basically a VM monitoring system. In this set of tutorials, we will be exploring Autoscaling of simple Eucalyptus instances.

To keep things simple, here is a definition of Autoscaling:

"Auto-scaling, also spelled autoscaling, is a cloud computing service feature that automatically adds or removes compute resources depending upon actual usage. Auto-scaling is sometimes referred to as automatic elasticity."

To know more about Autoscaling and how it works, you can alternatively view the Eucalyptus 3.3 User Guide found HERE.

There are three main concepts that make up an Autoscaling "task":

Launch Configurations

This contains all of the information necessary for Auto Scaling to launch instances, including instance type, image ID, key pairs, security groups, and block device mappings.

NOTE: Once a Launch Configuration is created, it cannot be updated. You will be required to delete the existing Launch Configuration and create a new one in its place.

There can be only ONE Launch Configuration associated with an Autoscaling Group.

Autoscaling Groups

This contains the information about the instances that will be actually be used for scaling operations.
The Auto Scaling group defines the minimum, desired (optional), and maximum number of instances that you will use to scale your application in times of varying workloads.

NOTE: Few scenarios may require a "desired" number on instances to be running in an autoscaling group, irrespective of the minimum and maximum instances defined. If in case you do not mention the desired count, then the default value is considered to be same as the minimum instance count.

Scaling Policies

This  defines how to perform scaling actions. Scaling policies can execute automatically in response to CloudWatch alarms, or you can execute them manually as well.

Scaling policies can either be triggered to "Scale Out" your instances (grow in number) or even "Scale In" (shrink in number).

You can set multiple Scaling Policies for each of your Autoscaling Groups, thus defining multiple points of scale in and out for your application, depending on varying workloads.

There are two types of scaling policies/ triggers: 
  1. On-Demand: These are triggered dynamically based on your application's workloads. Such Policies are generally used when the application workload is unknown, i.e. variable in nature.
  2. Scheduled: These are triggered based on a schedule, or a particular point in time. Such Policies are handy when the application workload is predictable and known in advance.

In the following tutorials, I will walk you through a simple step-by-step guide to creating your very own Autoscaling Tasks: