lift autoscale
Configure automatic scaling rules for tools based on CPU usage profiles.
lift autoscale
Configure automatic scaling rules for tools. Shows all autoscale status when no tool is specified.
Usage
lift autoscale [tool] [flags]
Options
| Flag | Description | Default |
|---|---|---|
--profile | Scaling profile: conservative, balanced, aggressive | — |
--cpu-target | Custom CPU percentage target (10-99) | — |
--min | Minimum instance count | 1 |
--max | Maximum instance count | 5 |
--off | Disable autoscale for this tool | false |
Profiles
| Profile | CPU Target | Scale Up Delay | Cooldown | Best For |
|---|---|---|---|---|
conservative | 80% | 3 min | 5 min | Production, cost-sensitive |
balanced | 70% | 2 min | 3 min | General workloads |
aggressive | 60% | 1 min | 2 min | Traffic spikes, real-time apps |
Each profile includes multi-tier scaling: normal, aggressive, and panic levels with progressively faster response.
Example
# Show all autoscale status
$ lift autoscale
SERVICE STATUS MIN MAX CPU TARGET PROFILE CURRENT
strapi ON 1 5 70% balanced 2
# Configure with profile
$ lift autoscale strapi --profile balanced --min 1 --max 5
Autoscale ON for strapi — profile=balanced, min=1, max=5, cpu=70%
# Custom CPU target
$ lift autoscale strapi --cpu-target 75 --min 2 --max 8
Autoscale ON for strapi — profile=custom, min=2, max=8, cpu=75%
# Disable autoscale
$ lift autoscale strapi --off
Autoscale OFF for strapi
How It Works
Autoscale writes rules to /opt/onelift/scale-rules.yml on the server. The OneLift scaler daemon reads these rules and adjusts replicas based on CPU metrics from docker stats.
Related
- lift scale - Manual scaling
- lift capacity - Check server resources
- lift limit - Set resource limits