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

FlagDescriptionDefault
--profileScaling profile: conservative, balanced, aggressive
--cpu-targetCustom CPU percentage target (10-99)
--minMinimum instance count1
--maxMaximum instance count5
--offDisable autoscale for this toolfalse

Profiles

ProfileCPU TargetScale Up DelayCooldownBest For
conservative80%3 min5 minProduction, cost-sensitive
balanced70%2 min3 minGeneral workloads
aggressive60%1 min2 minTraffic 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.