In an App Platform App Specification, the instance size and count can be specified for each service.

If they aren’t specified, the documentation states that default values are used.

Here’s a scenario:

  1. An app has been deployed with a spec using the API. The instance size and count are not specified in the spec. Thus, the defaults will be used.
  2. After that, the app is scaled in the control panel, changing the instance size and count.
  3. Then, a change is made to the spec using the API. The instance size and count are still not specified in the spec.

In this scenario, would the scaling configured in the control panel be respected, or would it be changed to the defaults due to the updated spec which doesn’t specify scaling?

Thanks to anyone who can provide clarity on this matter.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

When updating the spec, we don’t consider previous versions for setting default values. In the scenario you described, the instance size and count would default to the “basic-xs” instance count 1.

When updating from the API, we recommend pulling down the latest version of the spec, applying changes to the local document, and then using that to update the API. You can download the spec from the Settings section of the website, using the API you can load the spec via “GET /v2/apps/<APP_ID>” from the [].spec field, or from doctl you can get the latest spec doctl apps get <APP_ID> -o json | jq '.[] | .spec'.

Submit an Answer