Skip to main content

Autoscaling

Autoscaling adjusts your app's replica count automatically based on load, so you don't have to watch traffic and scale by hand. Vessl keeps the average container CPU near a target you set, adding replicas when it's busy and removing them when it's idle — within a min and max you control.

It's the automatic counterpart to manual scaling: same replicas, same zero-downtime rollout, but driven by a control loop instead of a button.

Enable it

  1. Open your app → SettingsAutoscaling.
  2. Turn on Enable autoscaling and set:
    • Min replicas — the floor (never scales below this).
    • Max replicas — the ceiling (capped by your plan's replica limit).
    • Target CPU % — the average container CPU the loop steers toward (e.g. 70).
  3. Save. The control loop takes over from the next check.

Autoscaling requires a plan that allows more than one replica (the Max is clamped to your plan's replica cap).

How it works

Every ~2 minutes, Vessl reads the average CPU% across your app's running replicas and decides:

ConditionAction
avg CPU above target, and replicas below maxscale up one replica
avg CPU well below target (under half), and replicas above minscale down one replica
otherwisehold
  • Scaling stays within [min, max], and Max never exceeds your plan's replica cap.
  • A cooldown (a few minutes) after each change prevents flapping up and down.
  • Scale actions reuse the normal scaling path — zero-downtime, no redeploy.
  • The loop also enforces the floor: if you set min = 2 while running 1, it scales up to 2 on the next check even if CPU is low.
  • While the app is stopped or mid-deploy, the loop takes no action for it.
tip

Start with a target around 60–75%. Lower targets scale out sooner (more headroom, higher cost); higher targets pack each replica tighter (lower cost, less burst headroom). Watch the metrics and adjust.

Manual scaling still works

You can still set an exact replica count on the Overview or Settings tab. With autoscaling on, the loop will move the count back into your [min, max] band on its next check — so use min/max to express the range you want rather than pinning a single number.

See also: Scaling & Replicas · Memory & Resources.