Scaling and RAM
Size a project's RAM in 256 MB steps, see which step changes your bill, and scale out the stateless tiers.
RAM is the one dial. Set a project’s RAM in 256 MB steps and its CPU cap follows; there is no separate CPU setting.
Scaling RAM
Your agent reads and sets it over MCP:
- Read the state.
nyx_project_state <project>returnsallocatedMb,reservedMb,floorMb, andremainingPoolMb: what’s allocated, what running pods hold, and what’s free in the account pool. - Size from the repo, not a guess. The framework, sidecars, and ML libraries tell you what the workload needs.
- Set it.
nyx_projectwithaction: ramandmb: <needed>rounds up to the next 256 MB step. The CPU cap rises with it.
The CPU cap is derived from RAM at allocatedMb * 500 / 1024 millicores, summed across every pod in the project:
| RAM | CPU cap |
|---|---|
| 256 MB | 125m |
| 512 MB | 250m |
| 1024 MB | 500m |
If the account pool has no room, shrink another project or have a person book RAM packs in the console. Never half-apply a deploy that’s short on RAM.
Every project and app shows live memory and CPU against its allocation, so you size from what actually runs:
What changes the bill
Three numbers are easy to mix up. Only the first one costs money beyond your plan:
- Your plan fee covers the baseline pool (8 GB on Starter, 48 GB on Business).
- RAM packs add 1 GB each to the account pool at €5 per month, billed by the day you hold them (at least one day). A person books and releases them under Settings → Subscription in the console, within the spend limit you set there. Your agent can read the pool (
nyx_project_list) but not book packs. - Project allocations and pod usage only divide the pool. Lowering an allocation with
nyx_project(action: ram) frees room in the pool for other projects;kubectl scaleor deleting an app frees room inside the project. Neither changes the bill.
To save money after a peak: lower the project allocations with nyx_project (action: ram), then release the packs you no longer need. The console refuses a release while allocations still need that capacity.
Scaling out: more than one replica
Vertical scaling covers most workloads. To run several replicas behind one Service:
- Stateless tiers scale freely. No local state between requests (no SQLite on disk, no local uploads, no in-process sessions) and no PVC, or only an
emptyDir. Setreplicasas high as the project’s RAM allows. - Stateful tiers stay single-replica or go StatefulSet. App PVCs are
ReadWriteOnceand bind to one node, so a second replica on another node can’t mount the volume and sits inContainerCreating. Databases, caches, and queues run atreplicas: 1; real HA is a StatefulSet with one PVC per pod plus app-level replication. The access mode is set when the volume is provisioned; editing the Deployment can’t widen it.
Rule of thumb: scale the stateless tier out, the stateful tier up. Shared read-write storage across replicas isn’t offered to apps today.
Sizing a pod
Size small web pods around 50 to 100m CPU; don’t copy a flat "1" or "200m" from elsewhere. Every container needs requests and limits for CPU and memory:
- Deployed with
nyx_deploy_manifests, a container without them gets small defaults filled in (requests 50m / 64Mi, limits 100m / 128Mi), and the tool says so. Treat that as a floor and set real values. - Applied any other way (for example
kubectl apply), a container without limits is refused by the project’s quota. limits.cpuover the cap fails withexceeded quota: limits.cpu(FailedCreate); no pod is created.
Note: Shrinking a project’s RAM below what its running pods reserve fails with a 409 (
below_reserved), returningrequestedMb,reservedMb, andfloorMb. Delete an app first, or pick anmbvalue at or abovefloorMb.
Limits outside the dial
- Pod count per project is capped by plan.
- Storage comes from a separate pool: your plan’s storage plus storage packs (100 GB each), not from RAM.
LoadBalancer/NodePortservices are always 0; the ingress is the one way in from outside.
See Projects & accounts for how workspaces, projects, and the pool relate.