Docker Community Forums

Share and learn in the Docker community.

Restricting swarm services to regions


(Stevesherwood) #1

How do I restrict swarm services to regions?

Eg.

Region A = 3 nodes
Region B = 3 nodes

I want 1 service instance to run in region A and one in Region B (requests being round-robined between them). If the service in region B stop working, I want another instance started in Region B etc until there are no remaining nodes left in region B.

I have tried using labels, but can get the right restrictions.