Skip to content

Scaling

Each service’s CPU, memory and storage can be changed from the project page without editing the compose file. Most changes apply to the running service, without a restart:

  • Growing CPU or memory applies live, up to the room its VM was started with (about twice its size, up to 4 GB more memory). Past that, the service is restarted at the new size.
  • Lowering memory of a fragile service always restarts it (taking memory away from a running database is how it crashes).
  • Storage grows live; shrinking restarts the service, and is refused if the data wouldn’t fit.

The new size is what’s billed from then on.

Turn on autoscaling for a service and set a maximum for CPU, memory and storage. CargoForge watches its usage about every 30 seconds and grows it when it’s running hot, then shrinks it back (never below the size in your compose file) when it calms down. Each change is listed on the project page, and billed for the time it lasted.

PUT /projects/{id}/autoscaling/{service}
{"enabled": true, "max_memory_mb": 2048, "max_cpu": 2, "max_storage_gb": 10}

Maximums are capped by your plan’s per-service limits. A fragile service’s memory is only lowered by a restart, so autoscaling never shrinks it live.

One copy of each service runs; deploy.replicas is ignored. To spread load, scale the service up, or split work across services.