Horizontal Scaling
Run multiple instances of your service across different servers for high availability and better performance. Traffic is automatically distributed across all healthy replicas with round-robin load balancing.
Configuring replicas
- Open your service detail page
- Go to the Scaling section
- Select the number of replicas (1–10)
- Click Save
Stackpad immediately deploys the additional replicas. Each replica runs on a different server by default (anti-affinity placement).
Plan limits
| Plan | Max replicas per service |
|---|---|
| Starter | 1 |
| Pro | 5 |
| Business | 10 |
| Enterprise | Unlimited |
Load balancing
Caddy distributes incoming traffic across all healthy replicas using round-robin load balancing. If a replica fails its health check, it’s automatically removed from the pool until it recovers.
Anti-affinity placement
By default, replicas are placed on different servers so that a single server failure doesn’t take down all instances of your service. The scheduler prefers nodes that don’t already have a replica of the same service.
Geographic spread
For additional redundancy, enable Spread across locations to distribute replicas across EU datacenters:
- Falkenstein, Germany (
fsn1) - Nuremberg, Germany (
nbg1) - Helsinki, Finland (
hel1)
Toggle this in the scaling settings. When enabled, replicas are distributed evenly across available locations.
Advanced mode
For fine-grained control, switch to Advanced mode to set the exact number of replicas per location:
fsn1 (Falkenstein): 2 replicasnbg1 (Nuremberg): 1 replicahel1 (Helsinki): 1 replica─────────────────────────────Total: 4 replicasRolling updates
When you redeploy a scaled service, replicas are updated one at a time:
- Replica 0 is updated and health-checked
- If healthy, replica 1 is updated
- Continue until all replicas are updated
Your service stays available throughout the update — there’s always at least one healthy replica serving traffic. If a replica fails its health check during the rollout, the remaining updates are paused.
Scaling down
When you reduce the replica count, excess replicas are stopped and their resources are released. A confirmation dialog warns you before removing replicas.
Restrictions
Horizontal scaling is not available for:
- Services with persistent volumes — stateful data can’t be shared across replicas
- Database and cache services — these have their own replication mechanisms
- GPU services — single-instance only
- Blueprint-based services — managed by their template configuration
What’s next?
- Scale to zero — automatically stop idle environments
- Dedicated infrastructure — run on your own isolated servers
- Architecture — how Stackpad places and manages services