Search⌘ K
AI Features

Scaling Up

Explore how to scale your Rails web service using Docker Swarm by running multiple container replicas to handle varying loads. Understand scaling commands, visualize container deployment, and manage resource cleanup on cloud platforms like AWS and DigitalOcean.

Scale Up the Web Service

Currently, we have a single container (or replica) of each service running on our swarm. However, with Swarm, we can scale up services to meet real or anticipated demand. Here we are talking about horizontally scaling your app, running multiple containers for service, each of which can handle a certain amount of load.

To scale our web service up to run three containers, the following command is used (you can try in the terminal below):

$ docker service scale myapp_web=3

You will be able to ...