# Scale an app and set resources > Change the replica count of an Orchard app, stop and start it, set its CPU and memory, and configure health checks. Source: https://docs.orchard.hackclub.com/deploy/scaling/ 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. ## Change replicas **Dashboard** 1. Open the app. 2. Go to **Overview**. 3. In **Pods**, use the **Replicas** control to set the count. **CLI** ```sh orchard deploy scale 3 ``` A deploy does not drop traffic if more than one replica is up and health checks pass. ## Stop and start an app 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**. **Dashboard** 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. **CLI** ```sh orchard deploy stop orchard deploy start orchard deploy start --build ``` `start` builds the newest held push if one exists. `--build` rebuilds from source before starting. ## Set CPU and memory **Dashboard** 1. Open the app. 2. Go to **Settings** > **Resources**. 3. In **CPU and memory**, select the sizes. 4. Select **Save**. Saving restarts the app. **CLI** ```sh orchard deploy resources set --cpu 500 --memory 512Mi ``` `--cpu` is in millicores. A value of `0` clears the setting to the organization default. The value you select is the container's limit. If a superadmin has [turned resource limits off](/operate/resource-limits/), 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](/deploy/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. > **Caution** > > When you change resources through the API, send every field you want to keep. An omitted value falls back to the organization default, which may be smaller than the current size. ## Set health checks 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. **Dashboard** 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. **CLI** ```sh orchard deploy health-check set --path /healthz --port 3000 ``` ## Quotas 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](/teams/quotas/). ## Related resources - [Metrics and alerts](/run/observability/) - Watch CPU, memory, and restarts after you change resources. - [Attach storage to an app](/deploy/storage/) - Keep files across restarts, and learn how volumes limit replicas. - [Choose an update strategy](/deploy/update-strategies/) - Control how Orchard replaces pods during a deploy. - [`orchard deploy` reference](/reference/cli/#deploy) - Every flag of the `orchard deploy` commands.