I'm using a Docker Swarm which spans multiple data centers. The Swarm runs in a "virtual private cloud".
One of the data centers participating in the setup has a somewhat slower link than the others. I'd like to avoid a particularly latency sensitive service to be scheduled in that data center.
- I can use placement constraints, but that will impact availability. If the "slow" data center for some reason would be the only one running, constraints will ensure that the constrained service never gets scheduled in that data center. Impacts availability.
- I can use placement preferences, but that is just a preference. If I added the label
lowlatency
to all nodes except the ones in the "slow" data center, the service may still be scheduled there. It's after all just a preference.
Is there a way to somehow constrain a service to certain nodes, but allow Docker to schedule the service on other nodes if the preferred nodes are unavailable?