Skip to content

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

  1. Open your service detail page
  2. Go to the Scaling section
  3. Select the number of replicas (1–10)
  4. Click Save

Stackpad immediately deploys the additional replicas. Each replica runs on a different server by default (anti-affinity placement).

Plan limits

PlanMax replicas per service
Starter1
Pro5
Business10
EnterpriseUnlimited

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 replicas
nbg1 (Nuremberg): 1 replica
hel1 (Helsinki): 1 replica
─────────────────────────────
Total: 4 replicas

Rolling updates

When you redeploy a scaled service, replicas are updated one at a time:

  1. Replica 0 is updated and health-checked
  2. If healthy, replica 1 is updated
  3. 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?