ConceptsDisks, scaling & suspend
Scale a service
One command changes the number of instances. There is no new deploy and no downtime.
Terminal
$ ferry scale api 3$ ferry status apiapi: live — 3/3 instance(s) runningINSTANCE DEPLOY STATE PORT CPU MEMORY RESTARTS STARTED6040c7 4a6f817d running 63295 0.0% / 1 CPU 11.9 MiB / 512.0 MiB 0 16s ago8cb56c 4a6f817d running 63326 0.0% / 1 CPU 11.9 MiB / 512.0 MiB 0 6s ago90f134 4a6f817d running 63325 0.0% / 1 CPU 11.9 MiB / 512.0 MiB 0 6s agoScaling changes the number of instances of a service. A web service, a static site, a private service or a background worker runs 1 instance by default. The maximum is 50.
What Ferry does
The service runs 1 instance.
1 / 4
The snapshot has the image, the variables, the command and the limits of the live deploy. Settings, limits or variables that you changed after the last deploy do not apply to the new instances. To apply them, restart the service.
Set the number at creation
ferry create api --repo https://github.com/you/api --instances 2 # at creationFerry saves the new number. Ferry applies it immediately after the deploy.
curl -X POST http://127.0.0.1:7878/api/v1/services/api/scale \
-H "Authorization: Bearer $FERRY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"instances": 3}'PATCH /api/v1/services/api with {"instances": 3} does the same. See Scale a service.