Resources #

...
apps:
  <APPNAME>:
    ...
    resources:
      cpu: 128
      memory: 128
      scale: 1
    ...

cpu (optional) #

Specifies how many CPU units will be reserved for the App to run.

1 vCPU has 1024 CPU units. The configured CPU units will be exclusively reserved for the App and will be available at all time. Additional CPU units might be available when the App tries to use more CPU units than reserved and when the load on the node, where the App container runs, is not fully utilised. So in general it is a good idea to start with a low number of CPU units for best resource utilisation which leads to lower costs.

The default for cpu resources is 128.

CPU resources can only be set in multiples of 128, e.g. 128, 256, 384 and so on. The minimum and default for this value is 128. The maximum depends on the SetOps configuration and the container instances the task runs on. A hint that the requested resources cannot be fulfilled is that a task is stuck in the provisioning state. Try a smaller value if this happens.

memory (optional) #

Specifies how many memory megabytes will be reserved for the App to run.

The configured memory will be exclusively reserved for the App. However, in contrast to the CPU configuration, this is also the maximum of memory what the App can allocate. If the App uses more memory than configured it might get killed.

The default for memory resources is 128.

Memory resources can only be set in multiples of 128, e.g. 128, 256, 384 and so on. The minimum is 128. The maximum depends on the SetOps configuration and the container instances the task runs on. A hint that the requested resources cannot be fulfilled is that a task is stuck in the provisioning state. Try a smaller value if this happens.

Scale #

Determines how many Tasks (containers) of the App are to be running simultaneously. The default value for scale is 1. You can specify an integer value between 0 and 16. A value of 0 means you do not want SetOps to run any container for this App. This may be useful to stop workers during deployments, for example.

It defaults to 1.

We recommend setting the scale for a web app in production to at least 2 for reliability reasons. The second container will be served in a different availability zone. That several zones are down at the same time is less likely. The application however must support that requests might be served by another instance.

Going further #

Configure Environment Variables