Skip to main content

Scaling

Sprintsail supports both manual scaling and automatic horizontal scaling based on metrics.

Manual scaling

Instances

Scale the number of running containers:

ss scale my-app --instances 3

CPU and memory

Adjust compute resources per instance:

ss scale my-app --cpu 500m --memory 1Gi

Combine all options:

ss scale my-app --instances 4 --cpu 1000m --memory 2Gi

View current scale

ss app info my-app
Name:       my-app
Status: running
Instances: 3/3 running
CPU: 500m per instance
Memory: 1Gi per instance
URL: https://my-app.my-org.sprintsail.com

CPU and memory units

UnitMeaning
250m0.25 vCPU
500m0.5 vCPU
1000m or 11 vCPU
128Mi128 MiB RAM
512Mi512 MiB RAM
1Gi1 GiB RAM

Autoscaling

Enable horizontal pod autoscaling based on CPU or memory utilization:

ss autoscale my-app --min 2 --max 10 --cpu-target 70

This scales between 2 and 10 instances, adding capacity when average CPU exceeds 70%.

Autoscale on memory

ss autoscale my-app --min 2 --max 8 --memory-target 80

Autoscale on both

ss autoscale my-app --min 2 --max 10 --cpu-target 70 --memory-target 80

When multiple targets are set, scaling happens when any target is exceeded.

View autoscaling status

ss autoscale info my-app
Autoscaling:  enabled
Min: 2
Max: 10
CPU target: 70% (current: 42%)
Memory target: 80% (current: 55%)
Instances: 3
Last scaled: 12 minutes ago (scale up: CPU 78%)

Disable autoscaling

ss autoscale disable my-app

This keeps the current instance count but stops automatic adjustments.

Configuration via ss.yaml

name: my-app
instances: 2
cpu: 500m
memory: 512Mi

autoscale:
min: 2
max: 10
cpu_target: 70
memory_target: 80

Scale-to-zero

Starter plan apps that receive no traffic for 30 minutes are automatically scaled to zero. The first request after scale-to-zero incurs a cold start (typically 2--5 seconds). To prevent scale-to-zero:

ss scale my-app --min 1

Growth and Enterprise plans do not scale to zero by default.

Plan limits

Each plan enforces maximum scaling limits per app:

ResourceStarterGrowthEnterprise
Max instances320Unlimited
Max CPU per instance500m2000m4000m
Max memory per instance1Gi4Gi16Gi
AutoscalingNoYesYes
Scale-to-zeroForcedOptionalOptional

Attempting to scale beyond your plan limits returns an error with a link to upgrade:

Error: Instance limit exceeded (3/3). Upgrade to Growth for up to 20 instances.
→ https://console.sprintsail.com/billing/upgrade

Scaling strategy

Guidelines for choosing instance size and count:

  • More small instances work better for stateless HTTP services. They spread load and survive individual failures.
  • Fewer large instances suit memory-heavy workloads like in-memory caches or ML inference.
  • Start with 2 instances and autoscaling for production apps. A single instance has no redundancy during deploys or failures.
  • Set CPU requests to match your steady-state usage. Autoscaling responds to spikes.

Next steps

  • Monitoring --- track resource utilization and set alerts
  • Plans --- detailed plan comparison
  • Deploying --- rolling updates and deploy configuration