F
F
Fenix9572021-08-31 10:32:07
linux
Fenix957, 2021-08-31 10:32:07

How to autoscale docker?

There is an application that runs in a docker container.
Now it is required for a certain event to increase the number of containers.
That is, the container image is the same, but only the launch argument can change.

Scaling should not occur due to a heavy load, but by an event or by a script that allows you to add 1 more container.

Read about

docker-compose up -d --scale app=5

But I need to add 1-5 more containers without restarting all current containers, for example
. Or turn off certain

ones. Which direction to look for?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
bankinobi, 2021-08-31
@bankinobi

If you need to "orchestrate" with docker, then docker swarm is better suited for this . The same docker, but spread over several hosts.
And it scales without reloading:
docker service scale helloworld=5

V
Vitaly Karasik, 2021-08-31
@vitaly_il1

That is, the image of the container is the same, but only the argument for launching can change .

As far as I know, the second requirement will not work with scaling.
Kubernetes can use horizontal autoscaling.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question