Skip to content

Autoscaling

Autoscaling adds replicas to a web app or worker under load and removes them when load drops, based on live CPU. Once it’s on, Ownkube owns the replica count. On Ownkube Compute, turn it on with the update_deployment MCP tool or the API; on your own cloud, from the deployment’s Settings tab.

Ownkube watches the average CPU of a deployment’s containers against the target you set. On Ownkube Compute the target is a percentage of the CPU limit; on your own cloud it is a percentage of the CPU request. When usage crosses the target Ownkube adds replicas up to your maximum; when usage falls it removes them down to your minimum. This is the horizontal autoscaling model: more copies of the same container, not a bigger container.

CPU target

Scale out when average CPU exceeds the target, for example 70% of the CPU limit on Ownkube Compute.

Memory target (own cloud)

Scale out when average memory exceeds the target, for example 80% of the memory request. Ownkube Compute sizes each replica’s memory automatically instead.

On your own cloud, set one target, both, or neither. With both, whichever is crossed first wins.

FieldDefaultRange
Min replicas11 to 100
Max replicas31 to 100
Target CPU utilization80%1 to 100
Target memory utilization (own cloud)80%1 to 100

For a web service on Ownkube Compute with traffic that varies through the day:

SettingValue
Min replicas2
Max replicas10
Target CPU utilization70%
CPU limit1000m
Memory limit1Gi

Two replicas stay warm, up to ten run under load (scaling out once they average 700 millicores), and the count settles back down when traffic drops. Each replica is metered per minute while it exists, so the bill follows demand. See Understanding your bill.

  • Once autoscaling is on, the fixed Replicas field is ignored. Turn autoscaling off to set a manual count.
  • Autoscaling and sleep are exclusive. Sleep needs a single replica; autoscaling needs at least one always on.
  • A reserved box billing mode applies per replica. Each replica autoscaling adds bills another box.
  • Jobs run to completion and do not scale. Databases scale by changing their box size, see Postgres.

The Overview tab shows running and desired replicas and the CPU and memory charts the scaler reads. Scale events appear on the Activity tab. A CPU or memory alert at a lower threshold than the scaling target warns you before the maximum is reached.