Instance size
How much CPU and memory each instance of a service gets is decided by a single choice: the instance size (flavor), taken from the platform catalog. There are no loose CPU and memory fields to fill in.
This page is about the size of each instance. How many instances exist is a different question, and lives in Scale and availability — on the same console screen.
The catalog
The catalog goes from smallest to largest — Micro, Small, Medium, Large, XLarge and 2XLarge — and each size brings:
| Information | What it is |
|---|---|
| CPU and memory | What each replica gets. With a catalog size, the guaranteed amount and the ceiling are the same number |
| Reference price | Per replica, for 730 h of operation in the month. It is not an invoice or measured consumption: what is charged comes from measured consumption |
| Available | A size can exist in the catalog and not accept new services right now; choosing it is refused with the reason |
The catalog belongs to the platform and is versioned: changing the catalog never rewrites the size a service has already chosen.
Choosing at creation
Every service is created with a size — it is required. In the console, the New project form has the Size of each replica field (Tamanho de cada réplica) for the web service created with the project. In the CLI, --flavor is required on zero services create:
zero flavors list # ID, NAME, CPU, MEMORY, PRICE/MONTH
SVC=$(zero services create web --env <environment> --flavor small --subdir apps/web)
Changing the size
- Open the project and go to Settings → Scale and availability — or open the service page.
- On the service, click Change size (Mudar tamanho).
- Choose the size. The dialog shows the CPU, memory and reference price per replica, and what changes when you confirm.
- Confirm.
From the CLI and the API:
zero services resize "$SVC" --flavor large
PUT /api/v1/services/{id}/resources
{ "flavor_id": "large" }
A size that does not fit the environment's budget is refused before the deployment, with 429 QUOTA_EXCEEDED and how many instances would fit. An unavailable size answers 409 FLAVOR_UNAVAILABLE. The old CPU and memory fields (cpu_request_millicores, memory_limit_mib and the like) are refused with 422 LEGACY_RESOURCES_RETIRED.
Saving is not applying
Size is configuration, and configuration changes through a deployment. With an active version, changing the size redeploys the service — same image, new configuration — and the screen (or the CLI) follows the operation to its outcome. A service that has never deployed has nothing to redeploy: the size stays declared, and the first deployment carries it. Choosing the size the service already has does nothing.
Saying "applied" because the form accepted it would be lying about the half that matters: the change only counts once the new version is live.
Legacy configuration
A service created before the catalog may still run with resources declared by hand. The screen marks it as Legacy configuration (Configuração legada) and shows what it actually has — CPU and memory per replica, with the ceiling when it differs from the guaranteed amount. Choosing a catalog size ends the legacy configuration.
Reading observed usage
The screen shows usage as an average per replica, to compare with the chosen size, and the service total next to it. Usage comes from periodic samples, and two readings matter:
- The age of the sample. A number from two hours ago does not describe now, and the screen shows the age instead of pretending it is live.
- Absence is not zero. Without measurement, the screen says "no measurement" — not "0%". A panel that answers zero when it measured nothing is indistinguishable from a panel that answers zero because everything is calm.
Common errors
| Symptom | Likely cause | What to do |
|---|---|---|
| The application restarts on its own under load | The chosen size's memory is too small | Choose a larger size and watch usage |
| Slow responses at peaks | The chosen size's CPU is too small | Choose a larger size, or turn on autoscaling |
services create exits with code 2 | --flavor is missing | Choose a size from zero flavors list |
QUOTA_EXCEEDED when changing | The size does not fit the environment's budget | Choose a smaller size or reduce the instances |
| I saved and nothing changed | The redeployment has not finished yet | Follow the operation on the screen itself |
| "No measurement" in usage | Collection has not produced a sample yet | See What exists today |
Next steps
Was this page helpful?
Report a problem on this pageDo not send passwords, keys, tokens, or customer data.