Autoscaling Rules
Autoscaling rules are supported from AutoScaler version 1.31.0
Once Autoscaler is installed and you've selected which volumes to optimize, the next step is to activate autoscaling: you can do this manually for each volume via the Fleet Manager, or set up an autoscaling rule.
Autoscaling rules are templates that identify volumes matching specific conditions and automatically enable autoscaling for them. Once activated, a rule applies to all existing and future matching volumes. This is particularly beneficial for initial autoscaling setup in large environments and continuous management in dynamic environments, such as EKS clusters, where volumes are frequently created and destroyed.
Create a New Autoscaling Rule
Autoscaling rules can be created simply and easily through the Datafy app.
To get started, open the rule creation wizard, by selecting the "Create new rule" button:

You can automate rule creation and management across multiple accounts using the datafy Terraform provider. For details see the autoscaling_rule resource in the Terraform registry.
Intereseted but don't use Terraform? Let us know!
Define Rule Conditions
Each autoscaling rule is built from conditions that define which volumes it applies to. A volume will match a rule if it meets all of the conditions in the rule (logical AND).
Each condition contains a volume attribute, a logical operator and at least one value.
Volume Attribute
Select one of the following volume attributes for the condition to check:
Cluster - cluster name, use to apply autoscaling to all volumes in a cluster
Node group - node group name, use to apply autoscaling to certain node groups within a cluster
Instance ID - use to apply to or exclude volumes attached to specific instance. This is not recommended for dynamic environments where volumes may move between EC2 instances.
Volume Tags - array of volume tags, with each tag formatted as a single string
"key:value"

Logical Operator
Define which operator will be used to check the selected attribute:
Is – the value must match exactly
Is not – the value must not match
Contains – the value must include the specified text
Does not contain – the value must not include the specified text

For the volume tags array, the is and contains conditions check that at least one tag matches the defined values, and the is not and does not contain conditions checks that none of the tags match the defined values
Values
Use the search to find values of the existing attributes in your account. For conditions with exact match operators (is or is not) an exact value must be selected from the list, for conditions with contains or does not contain any value can be used.
If you add multiple values to a condition, a volume will match it if the attribute has any one of the defined values (logical OR).

dev or prod"You can add additional conditions to your rule with the "+And" and "+Add type" buttons.

Check Matching Volumes
Once your conditions are defined, select the "Next" button to see which volumes match the rule.
The matching volumes are presented in three categories:
Matching volumes - volumes that matched the rule and can start autoscaling right away.
Potential volumes - volumes that matched the rule but don't have AutoScaler installed. These will start autoscaling once AutoScaler is installed on their instance.
Excluded - volumes that match the rule but are excluded from autoscaling rules.
Volumes that match the rule but do not support autoscaling (for example, unattached volumes) will not appear.

If you find volumes you didn't intend to include, go back and continue editing your rule until you reach the desired result.
Create Rule
Once you're satisfied with the rule conditions and the volumes it will apply to, create the rule:
"Create" button - your rule will be created in an inactive state. The rule will not activate autoscaling until it is turned on.
"Create and Apply" - your rule will be created and start activating autoscaling for the matching volumes immediately.
Monitor and Manage Rules
Activation Progress
After you create and apply a rule, autoscaling is activated for all matching volumes. To view these volumes and their status, select the rule in the AutoScale Rules table and visit the "Matching Volumes" tab. You can monitor the live progress of each autoscaling activation event in the Optimization Actions on the Reports page and track actual storage savings in the Usage and Utilization charts on the same page.
When autoscaling is activated, volumes attached to the same instance migrate sequentially to avoid impacting your applications. Migration occurs locally on the relevant instance, allowing unlimited volume migrations in your account simultaneously.
Editing Rules
All rules in your account appear in the AutoScale Rules table, summarizing the number and capacity of volumes matching each rule. By selecting a rule, you can view its full conditions and list of matching volumes, divided into matching, potential, and exceptions.
From here you can:
Edit a rule's conditions
Disable or enable a rule
Delete a rule
Changes to a rule (including disabling or deleting) do not reverse previously executed autoscaling activations - those volumes will continue to autoscale until directly deactivated.
Exceptions from Rules
Some volumes are defined as exceptions from the autoscaling rules - even if they match, rules will not be applied to them.
Volumes that have an exception are identified in the All Volumes table, and are listed as exceptions to the specific rules that apply to them.

Exceptions are from all autoscaling rules, not from any specific rule
Creating an Exception
Volumes are defined as exceptions in one of two ways:
When autoscaling is deactivated for a volume, it is automatically made an exception to the rules. This prevents any rule from re-activating the autoscaling.
When viewing the details of an existing rule, select any matching volume and create an exception for it. This can be done for active and inactive rules, and matching or potential volumes.

Direct exceptions of specific volumes should be used to handle special cases. To prevent undesired autoscaling activation of a category or group of volumes, make sure to add exclusive conditions to rules when they are created.
Clearing Exceptions
If you want to clear an exception from a volume, find it in the exceptions list of a rule that applies to it, and select the "Remove Exception" button. If the relevant rule is active and the volume is attached to an instance with AutoScaler installed, autoscaling will be automatically activated for the volume.

You don't need to clear exceptions to activate autoscaling for a specific volume, you can activate it directly from the All Volumes table.
Last updated
Was this helpful?
