Auto scaling

You can define policies in your blueprints for auto scaling that Dell Cloud Manager will use to scale capacity up or down as needed to handle increased or decreased demand.

Currently Dell Cloud Manager will perform a scale up or scale down operation when a DCM agent running on any server in the stack “signals” the need to do so.

Note

The current function only supports auto scaling based on CPU utilization.

To implement auto scaling you first need to create groups. The groups are treated as a logical unit for the purposes of auto scaling.

You need to assign a unique section name for each group in your template. Inside the group you need to define members, properties, policies, actions, measurements and criteria.

Attention

It is not recommended to “share” measurement, criterion, and actions with other policies defined in the template. Each policy you define in a template should have their own set of measurement, criterion, and actions.

Members

  • The members: section is where you define the name(s) of the node_templates to be included in the group.

    Example: members: [vm1, vm2]

Properties

There are properties you need to define in the group.

  • instances: - The initial number of servers to start when the stack is started
Example: instances: 2
  • minInstances: - The minimum number of servers
Example: minInstances: 1
  • maxInstances: - The maximum number of servers
Example: maxInstances: 10
  • coolDown: - The number of seconds to wait before performing an auto scaling operation following a previous auto scaling operation.
Example: coolDown: 300

Policies

  • The policies: section inside the group is where you define the auto scaling policy definitions. The policies reference the actions:, measurements: and criteria:.

Actions

  • The actions: section inside the group is where you define the the auto scaling actions.

Measurements

  • The measurements: section inside the group is where you define the measurements to perform which will be used to determine when to perform the auto scaling actions.

Criteria

  • The criteria: section inside the group is where you define the criteria which is used along with the measurements used to determine when to perform the auto scaling actions.

Example

Here is an example outline for a group defining an auto scaling policy. The details of these sections: policies, actions, measurements and criteria will be covered in the next few pages.

 # scaling_group_1 defines the auto scaling properties that will apply to nodes vm1 and vm2
     groups:
        scaling_group_1:
          members: [vm1, vm2]  # The node_templates with the statement names "vm1" and "vm2" are in this group
          properties:
            instances: 2       # The initial number of servers to start when the stack is started
            minInstances: 1    # The minimum number of servers
            maxInstances: 10   # The maximum number of servers
            coolDown: 300      # The number of seconds to wait before performing an auto scaling or auto healing operation following a previous operation.

          # Policies define the auto scaling. They reference by name (label) the actions, measurements, and criteria defined in the template.          
          policies:
            scale_up_on_cpu:           # This is a label
              type: dcm.policy.types.BasicPolicy
                  ...
                  ...

            scale_down_on_cpu:         # This is a label
              type: dcm.policy.types.BasicPolicy
                  ...
                  ...

          # Actions defines details of what actions to perform
          actions:
            scale_up:                  # This is a label
              type: dcm.policy.action.ScaleUpGroup
              properties:
                  ...
                  ...

            scale_down:                # This is a label
              type: dcm.policy.action.ScaleDownGroup
               properties:
                  ...
                  ...

          # Measurements are used to determine when to perform the auto scaling **actions** you define                  
          measurements:  
            cpu_idle_time:             # This is a label
              type: dcm.policy.measurement.CpuIdle
                  ...
                  ...

            cloud_reported_status:     # This is a label
              type: dcm.policy.measurement.ResourceActive
                  ...
                  ...

          # Criteria are used along with the measurements to determine when to perform the auto scaling **actions** you define
          criteria:  
              more_than_80:            # this is a label
                type: dcm.policy.criteria.SeriesGreaterThan
                  ...
                  ...

              less_than_20:            # this is a label
                type: dcm.policy.criteria.SeriesLessThan
                  ...
                  ...