Skip to main content

Scaling Applications

Appliku supports different scaling models depending on whether your application runs in standalone mode or cluster mode.

Standalone Mode

In standalone mode, each process runs as a single Docker container on your server. Scaling in standalone mode means:

  • One container per process -- you cannot run multiple replicas of the same process on a single server
  • To handle more load, you can vertically scale by upgrading your server to one with more CPU and memory
  • You can also run multiple worker processes with different names to parallelize background work

Cluster Mode

Cluster mode uses Docker Swarm and supports horizontal scaling with multiple replicas per process.

Setting the Scale

  1. Go to your application in the dashboard
  2. Open the Processes tab
  3. Click Change Scale next to the process you want to scale
  4. Enter the desired number of replicas
  5. Click Apply Scale

Each replica runs as an independent container. Docker Swarm distributes replicas across available nodes in the cluster.

How Scaling Works

  • Web processes: Docker Swarm load-balances incoming requests across all replicas of the web process. Each replica receives a portion of the traffic.
  • Worker processes: Each replica independently pulls from the same job queue, increasing your throughput for background tasks.
  • Scaling down: Reducing the replica count gracefully stops excess containers. Running tasks may be interrupted depending on your application's shutdown handling.

Scale Updates

After changing the scale, it may take 10-30 seconds for the new replica count to be reflected in the dashboard. Docker Swarm handles the orchestration of starting or stopping containers in the background.

Choosing the Right Scale

  • Start with 1 replica and monitor your application's performance
  • Scale web processes when you observe high response times or request queuing
  • Scale worker processes when background job queues are growing faster than they are being processed
  • Each replica consumes memory and CPU on the cluster nodes -- ensure your cluster has sufficient resources before scaling up