Scaling
Use lizard scale to add service replicas, raise CPU or memory, or grow addon storage. To scale a service to zero, let it sleep when idle or pause it.
Scale a service
lizard scale --service api --replicas 3
lizard scale --service api --cpu 2 --memory 2048| Flag | Applies to | Allowed values |
|---|---|---|
--replicas <n> | apps | 1 up to your plan’s limit: 1 during the trial, 5 on Pro and Enterprise |
--cpu <cores> | apps and addons | whole cores: 1, 2, 3, 4 |
--memory <mb> | apps and addons | 128 to 8192 MB (1 MB steps) |
--storage <mb> | addons only, grow-only | 512, 1024, 2048, 4096, 8192, 16384 |
You can combine flags in a single command. Replica changes roll out without a rebuild. CPU and memory changes restart the service with the new limits.
Horizontal scaling
Run multiple replicas of an app behind the load balancer:
lizard scale --service api --replicas 5Each replica is its own pod. Make sure your app is stateless (store state in Managed Postgres, Managed Redis, or Managed Object Storage) so replicas are interchangeable.
Vertical scaling
Give a single replica more resources:
lizard scale --service api --cpu 4 --memory 8192Growing addon storage
You can grow addon data volumes, but you cannot shrink them:
lizard scale --service postgres --storage 8192Sleep when idle
lizard sleep --on lets a web service sleep when it gets no traffic and wake on the next request in about a second. By default it sleeps after 10 minutes without traffic; set 5 to 1440 minutes with --idle. Turning it on restarts the service once. It works only for a service with a port and one replica, so not for workers. Managed Postgres and Managed Redis can sleep too.
lizard sleep --on --idle 30 --service api
lizard sleep --off --service api # always onSee lizard sleep.
Pause a service
lizard pause stops a service or database without deleting it: it scales to zero and keeps its URL, password, settings and data. lizard resume starts it again. A paused GitHub service ignores pushes until you resume it.
lizard pause api
lizard resume apiTo pause every service in a project or workspace, use lizard project pause or lizard workspace pause. See lizard pause.
Verifying
lizard ps # replica status + URL
lizard events # deploy history + current replicas
lizard metrics # live CPU / memory / network / disk
lizard metrics --cost # cost instead of metricsA replica change creates no deploy, so lizard events doesn’t list it; check the Replicas table instead.
See also
- Observability → Metrics: resource and cost monitoring.
lizard scale: the full command reference.- How to estimate CaaS cost: which meters to compare when estimating a bill.
Updated