Docker-compose and scaling with links

I’ve been playing with the latest docker-compose ( version 1.3.1 ) and have been trying to scale up a pair of services. In particular a webservice container with a link to mongo shard-routing server ( mongos server ). Ideally, each webservice container will have it’s own mongos container ( a mongo recommended configuration ).

I have a 2-node docker swarm managed with docker-machine ( 0.4.0-dev ). I can successfully bring up the webservice + mongos on a single node with compose. But when I try to scale services up to 2, I get a problem with the links. Compose seems to try to create links between my new webservice container and both mongos container:

$ docker-compose scale prodmongos=2 webservice=2
Starting new HTTPS connection (1):
Creating sample_prodmongos_2...
Starting sample_prodmongos_2...
Creating sample_webservice_2...
Unable to find a node fulfilling all dependencies: --link=sample_prodmongos_1:prodmongos_1 --link=sample_prodmongos_1:sample_prodmongos_1 --link=sample_prodmongos_2:prodmongos_2 --link=sample_prodmongos_2:sample_prodmongos_2

My docker-compose file looks like:

  image: "private/webservice:123"
   image: "private/mongodb"
   command: [

My expectation would have been that the sample_webservice_2 webservice container would only be linked to the sample_prodmongos_2 container and not to both the sample_prodmongos_1 and sample_prodmongos_2.

Is there a way to get around this behavior?