Money
Right-sizing
What each service used over the last week, and the changes that would cut the bill or stop it slowing down, with the saving of each.
Spend less, on each project page, compares what your apps actually used last week with how they're set up, and suggests changes with the monthly saving for each, like a smaller size or sleeping when idle.
How to use it: open the project, find Spend less, and press Apply on any suggestion you like.
"Cut my hosting bill without slowing anything down."
Spend less, on a project's page, compares what each service actually used over the last week with how it's set up. It suggests changes, each with its monthly saving.
What it suggests
CLI bills CPU and memory as measured, not the size of the plan. So the changes that really lower the bill are the ones that stop paying for idle time:
| Suggestion | When | Saving |
|---|---|---|
| Sleep when idle | An app had no requests in most of the hours it ran | What it cost while idle |
| Fewer copies | Several copies, each mostly idle | One copy's cost |
| Static site | An app that only serves files (nginx, serve -s dist) | Nearly all of it: static sites pay only for bandwidth (/docs/static-sites) |
| Bigger plan | Peaks near the plan's CPU or memory limit | Nothing; it stops throttling and out-of-memory restarts |
| Smaller plan | Never comes close to its plan | Nothing on the bill. It lowers the most the service can cost an hour, which spend caps and approvals use |
How plans are sized
Plans are sized from the 95th percentile of hourly CPU (with 50% headroom) and the highest hourly memory (with 30%). A service needs a day of running time before it gets advice.
Apply the advice
GET /v1/projects/:id/rightsizing?days=7
POST /v1/projects/:id/rightsizing/apply {"include": ["sleep", "plan"], "serviceIds": ["svc_…"]}apply on its own makes only the low-risk changes: sleeping idle apps, and smaller plans. Pass include to apply fewer copies or bigger plans; a bigger plan goes through the project's spending approvals like any other. Turning an app into a static site needs its output folder, so that one is always left to you.
Idle detection needs the router's request metrics (CLI_TRAEFIK_METRICS_URL). Without them the report says so and skips that suggestion. Agents use cli_rightsize.