Docker 1.12 Swarm Service Limit Number of Tasks Running per Node

I’ve got a swarm service created which I’ve scaled up. However, swarm is stacking the containers twice on a single node even thought there are additional nodes. Is there any way to limit the number of tasks that can be running on a node?


currently there is no way for replication-mode to ensure that tasks of the same service goes on different nodes.
Follow the issue

to get updates on this.