8 Reasons to Move to Docker Swarm

31 / Jul / 2016 by Raghu Sharma 0 comments

Docker_swarm_cluster

What is Docker Swarm:

Docker Swarm is the orchestration tool from the makers of Docker. In the words of Docker website itself, “Docker Swarm provides native clustering capabilities to turn a group of Docker engines into a single, virtual Docker Engine.”

In case you are unfamiliar with what Docker is, you can read my previous post about “Setting up/migrating your WordPress website on Docker”

Why Swarm:

Here are few reasons for considering docker swarm as your orchestration tool.

  1. Simple setup process: Docker Swarm is pretty easy to set up and run. You need to bring up a discovery backend
  2. Follows Unix Philosophy: Do one thing and do it well. This one is more of a Docker features for all its services (Including Docker, Docker machine, Docker compose, etc.)
  3. Docker Compose integration: If you are planning to use Docker Compose with your cluster to bring up the nodes, you can use the compose files without any change in them.
  4. Support for a plethora of service discovery methods: The Docker Swarm cluster consists of a Swarm Discovery backend, Swarm Manager, and Swarm Nodes. The Nodes and Manager register themselves with the Discovery backend. Docker Swarm supports various types of service discovery options such as Token, Consul, etcd and zookeeper for service discovery.
  5. Provides Manager failover with Multi-master setup: The Swarm manager is responsible for management of the whole cluster. So it is very important that you make this master redundant. If the master fails, the whole cluster will be down.
  6. Supports all machines: The Nodes that work in the Swarm cluster setup can be anything ranging from a physical machine, a virtual machine or any cloud instance.
  7. Compatible with Docker API: Docker Swarm can be fully integrated with Docker services. The Docker API is integrated into Swarm so that all other Docker tools can be used with Docker Swarm.
  8. Container autostart: Docker Swarm supports container autostarting in case any container goes down.

The limitations:

  1. Load balancing with Docker Swarm: The Docker Swarm, for now, does not have load balancing integrated into it. You need to use external load balancers such as Nginx or HAProxy to load balance Swarm cluster applications.
  2. Automated backups: There is no provisioning for automated backups with Swarm itself. All the containers need to be backed up either via script or manually.
  3. Autoscaling of containers: Docker Swarm does not provide any built-in option for autoscaling Docker containers when resource usage goes high.

Despite its limitations, Docker Swarm remains one of the favourite tools for orchestration. If you are planning to move your production infrastructure to Docker swarm, you can read about building the Docker Swarm cluster for production here.

FOUND THIS USEFUL? SHARE IT

Leave a Reply

Your email address will not be published. Required fields are marked *