Docker Community Forums

Share and learn in the Docker community.

Can docker service scale the swarm it is in?

swarm
docker

(Deltax) #1

I need a custom monitor application running in my docker swarm, which has logic to decide whether I want to create more instances of another worker application running in the swarm. Is it possible for my monitoring service to tell the swarm to add new instances of my worker application?

Eg: Initial state: swarm -> 1 Monitor + 3 Worker
monitor realizes it needs 4 workers now and asks swarm to add an instance.
Final state: swarm -> 1 Monitor + 4 Worker

(p.s. all workers are of the same image)