Container Orchestration With Kubernetes Docker Swarm And Mesos Marathon


Hello everybody,

today I want to leave few notes about following video: which is done by Adrian Mouat.

First of all, what is orchestration definition: "The planing  or coordination of the elements of a situation to produce a desired effect, especially surreptitiously". 

So, what are elements in Kubernetes, Docker Swarm and Mesos maraphon?

  1. Containers
  2. Hosts
  3. Networking

What are desired effects? Here they are:

  1. Running application
  2. Automatically scale
  3. Fault tolerant
  4. Node failover, node rebalancing, health checks
  5. Efficient use of resources
  6. Require little of manual intervention

Swarm and compose

  1. Docker official solution
  2. Uses the same API as the Docker Engine
  3. Swarm arguably mainly "clustering"
  4. Compose for "orchestration"

In other words swarm is responsible for clustering, while compose for orchestration. If to compare swarm with Mesos and Kubernetes, it's possible to say that swarm is little bit simpler then two others.


First point, which is needed to be taken into account is Scheudiling. It consists of two steps: choose host for a container, choose strategy and filters/constraints. 

Swarm has following scheduling strategies:

  • Random. Takes around host and starts there container.
  • Binpack. Completely fill container before moving to the next host.
  • Spread. Tries to spread containers evenly across all hosts.
  • Pluggable

Binpack and spread are somehow in contrast between each other. In binpack you try to use most efficient use of resources, but if one of resources will die, you'll loose much more, then in case if one of spread resources will die.

Swarm filters, they describe which container can be executed on particular node. For example:

  • Only nodes labeled staging
  • Only nodes which have image
  • Only nodes running a given container

Sample of docker compose file:

version: "2"



                      image: amouat/identiorca: 1.0








                                 image: amouat/dnmonster:1.0







In presented fragment of yml file environmnet plays role of constraint. 

this part:




means the following: redis container to come app next to identiorca_dnmonster_1. 

No Comments

Add a Comment


Comments are closed