Documentation

Scaling and sleep

Manual scaling, autoscaling on CPU and memory, and fast scale-to-zero for free web services.

Manual scaling

Set the number of instances in Settings → Scaling or from the CLI:

rebasable scale my-api 3

Traffic is balanced across healthy instances. The limit per service depends on your instance type and workspace plan.

Autoscaling

On paid instance types (Pro workspace and above) you can scale automatically between a minimum and a maximum, targeting a CPU and/or memory percentage:

rebasable services update my-api --autoscale 2-8 --autoscale-cpu 70

We check usage every 30 seconds, add instances when the average goes above the target and remove them when it stays below. Your spend cap always applies: autoscaling never takes you over it.

Sleep (scale to zero)

Free web services sleep after 15 minutes without requests. When the next request arrives, we start the service and hold the request until it is ready. Our target is under two seconds to wake, so the first visitor gets a slightly slower response instead of an error page or a long wait.

  • Change the idle time with rebasable services update my-api --sleep-after 30.
  • Paid instance types never sleep unless you enable it.
  • Static sites never sleep.

To keep a service always on, move it to a paid instance type (from Starter).