Scale and suspend Snowflake App Runtime apps¶
An app starts as one instance and keeps running until you stop it. You can scale up to more instances, or scale down to zero.
Scale to more than one instance¶
In app.yml:
min_instances: fewest instances Snowflake runs while the app is up. Must be at least1. Default is1.max_instances: most instances Snowflake runs. Must be at leastmin_instancesand no more than10. Default is1.
If max_instances is greater than min_instances, Snowflake adds instances
when CPU is high and removes them when CPU is low. See
How CPU-based autoscaling works.
You pay for compute nodes, not per instance. Snowflake packs instances onto a node and adds a node only when the existing ones are full. See Cost and credit usage for Snowflake App Runtime.
These fields don’t take an app to zero. Suspend it instead.
Scale to zero¶
Suspend the app to stop it and release compute:
You need OWNERSHIP or OPERATE on the service. See
Delegate lifecycle control.
To check whether the app is RUNNING or SUSPENDED, see
Check service status.
If RESUME fails because the runtime image is blocked, upgrade to a new
package version first. See
Snowflake App Runtime limitations.
You can also set an idle window in app.yml:
auto_suspend_secs: idle seconds before Snowflake can auto-suspend the app.0(the default) disables it. The minimum non-zero value is300.auto_resume: resume on the next request. Default istrue.
To stop the app yourself, run SUSPEND.
Changes from ALTER don’t survive deploy¶
You can set instance counts and auto-suspend with
ALTER APPLICATION SERVICE
as well. That change isn’t permanent: the next snow app deploy puts the
values back to what’s in app.yml, or to the defaults if those keys aren’t
there. To keep a value, put it in app.yml.