Does Default Scaling Override Control Panel Scaling?

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.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Accepted 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'.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.