Docker Community Forums

Share and learn in the Docker community.

Moving some swarm server to new data center


We are planning moving of few our Docker swarm machine. How should this be handled? Can I just shutdown the manager and worker, and start on new data center, or do I need to drain first?

I’m thingking that the swarm is designed so that one machine can go down, so there should be no problem when moving one server (manager / worker) at the time?

Thanks for any support!

Unless your current location and the data canter are connected with a low latency network, there will be downtime, as the raft consensus algorithm swarm uses under the hood depends on it.

If yoru both locations are connected with low latency network then, you will definitly want to drain a node, unregister it and register a new node in the new data center, then repeat until no nodes exist in the old location and your services are running in the new data center.

Note: Docker swarm neither likes if node ip’s or host names change for existing nodes.