Docs menu

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.

Explain it

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:

SuggestionWhenSaving
Sleep when idleAn app had no requests in most of the hours it ranWhat it cost while idle
Fewer copiesSeveral copies, each mostly idleOne copy's cost
Static siteAn app that only serves files (nginx, serve -s dist)Nearly all of it: static sites pay only for bandwidth (/docs/static-sites)
Bigger planPeaks near the plan's CPU or memory limitNothing; it stops throttling and out-of-memory restarts
Smaller planNever comes close to its planNothing 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

API
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.