Skip to content
Install

Scale an app and set resources

Scale an app out with more replicas so that it handles more traffic and survives a pod restart, or scale it up with more CPU and memory. Health checks tell Orchard when a pod is ready, so a deploy only sends traffic to pods that work. You can also stop an app to free its resources and start it again later.

  1. Open the app.
  2. Go to Overview.
  3. In Pods, use the Replicas control to set the count.

A deploy does not drop traffic if more than one replica is up and health checks pass.

Stopping an app scales it to zero and keeps its replica count for later. While the app is stopped, Orchard holds pushes to its repository and does not build them. The header shows how many pushes it holds, such as 3 pushes since.

To stop the app, open More actions in the header and select Stop.

To start it again, take one of these steps in the header:

  • Select Start.
  • If pushes are held, select Build and start. Orchard builds the newest held commit.
  • To build from the current branch head, open More actions and select Deploy and start.

Restart stays off until the app runs.

  1. Open the app.
  2. Go to Settings > Resources.
  3. In CPU and memory, select the sizes.
  4. Select Save. Saving restarts the app.

The value you select is the container’s limit. If a superadmin has turned resource limits off, the resource picker shows that limits are off and these sizes do not apply. To size an app from its measured usage, apply resource suggestions.

  • Memory: The request equals the limit. The app gets that amount, and Kubernetes kills it if it uses more.
  • CPU: The request is 10% of the limit, with a minimum of 50 millicores. The app can use CPU up to the limit when the node has capacity. To change this, set CPU_REQUEST_RATIO and CPU_REQUEST_MIN_MILLI on the server.

Health checks decide whether a pod counts as ready. An app that runs but fails its check shows as failing. Orchard applies the checks again on each rebuild.

  1. Open the app.
  2. Go to Settings > Health checks.
  3. Turn on Check this app.
  4. In Check with, select the method.
  5. Enter the path or command, and the port.
  6. Select what the check controls: Restart the container when it fails, Stop sending traffic until it passes, or Allow extra time on startup.
  7. Select Save. Saving restarts the app.

An organization can set resource caps, and each member can have an allowance inside those caps. The limit for a new app is the smaller of the amount left in your allowance and the amount left in the organization’s cap. To set caps and allowances, refer to Set quotas.