Web and workers
scaled separately
List web, worker and release commands in a Procfile. Each runs in its own containers, and only web gets traffic.
Detected
On every deploy
How it works
From Procfile to replicas
No Procfile? Your image’s own command runs as web.
01
Add a Procfile
List web, worker and, if you need one, a release command.
web: npm start
worker: node worker.js02
Deploy
Each process type starts with one container. Only web gets traffic.
git push slasha main03
Scale up
Add web replicas for traffic or workers for a long queue.
slasha scale web=3 worker=2Scaling
Scale web and workers separately
A long job queue doesn’t mean extra web servers. Change counts from the Scaling tab or the CLI.
- Several at once:
web=3 worker=2 - Minimum of one per process type
- Later deploys keep the same count
Routing
Only web gets traffic from the internet
Caddy spreads requests across your web containers. Workers sit on the app’s private network with its databases, out of reach from outside.
- Traffic shared across web replicas
- Workers reach databases but aren’t public
- A failed release command stops the deploy
storefront.ship.acme.dev
↓ Caddy · HTTPS
storefront private network
One container per replica
Each replica has its own name in the logs
Each replica is its own container that restarts if it crashes. If web.2 misbehaves, you can see it and filter to it.
- Log prefixes like
web.0andworker.1 - Filter with
slasha logs -p worker
$ slasha scale web=3 worker=2
Scaled web to 3.
Scaled worker to 2.
$ slasha logs -f
[web.0] GET /products 200 · 24ms
[web.2] GET /checkout 200 · 37ms
[worker.1] send-receipt #8812 done
[web.1] POST /cart 201 · 41ms
[worker.0] sync-inventory #8813 done
More servers
Add more servers when you need them
Add servers as nodes and choose where each app runs. Give a busy API its own server, or move an app to a bigger one.
- Pick a node when you create an app
- Moving an app copies its volumes
- One dashboard and CLI for all of them
local
- storefront
- docs
- admin
eu-worker-1
- api
- image-worker
Limits
What Slasha doesn’t do (yet)
Good to know before you plan around it.
No autoscaling
Counts only change when you change them. Metrics and alerts tell you when.
No CPU or memory limits
Processes on a server share its CPU and memory.
One node per app
All of an app’s processes run on one server. Spread load across apps.
More details
Procfile
web, worker and release. Each line is one command.
No Procfile needed
Without one, the image’s own command runs as web.
Release phase
Migrations run once before new processes start.
Scaling tab
Increase, decrease and apply from the dashboard.
One command
slasha scale web=3 worker=2 from any machine.
Zero-downtime deploys
Each web replica passes a health check before traffic moves.
Shared /data
Every process gets the app’s managed volume at /data.
PORT injected
Slasha sets PORT: your own value, your EXPOSE port or 8080.
Questions about processes & scaling
Have another question? Ask on GitHub.
Does Slasha autoscale?
slasha scale.Can I set CPU or memory limits per process?
What about process types other than web, worker and release?
Can I scale a process to zero?
release at all, because it runs once per deploy.Can one app’s processes run on several servers?
Does scaling need a redeploy?
Other features
All featuresRun and scale your app’s processes
Free and open source. Your first app can be live in ten minutes.