Kubernetes vs Docker Swarm vs Mesos – A Look at the Major COEs from an Architect’s Perspective

Sometimes we ponder, what does container orchestration engines do? What are the similarities and differences between them?

So, lets shed some light on container orchestration engines, and on Kubernetes, Mesos, and Swarm. These all fall into a class of DevOps infrastructure management tools and are collectively known as Container Orchestration Engines (COEs).

Basically, COEs provide an abstraction layer between pools of resources and the application containers that run on those resources. Along with providing extra security, COEs also solve the problem of taking multiple discrete resources to the cloud or datacenter. It also provides an additional functionality of combining them into a single pool, onto which a variety of applications can be deployed.

These applications usually range from simple three-tier web architectures to large-scale data ingestion and processing. Though they cover the same domain, however, each of them is unique and have different feature sets, learning curves, vary in maturity and their ultimate ease of use.

Some high-level features that they share are:

  • Container scheduling
  • High availability of either the application and containers or the orchestration system itself.
  • Parameters to determine container or application health.
  • Service discovery
  • Load Balancing requests
  • Attributing various types of storage to containers in a cluster.

These are some of the high-level services provided by an orchestration engine. Though these tools perform these functions differing one or two degrees to one another, their implications may vary sometime.

Kubernetes CO Capabilities

Let’s have a look at the origin of ‘Kubernetes.’ Kubernetes often termed as ‘k8s’ was first released in June 2014 and the fundamental coding was done in ‘Go.’ Having its roots related to ancient Greek script, the word Kubernetes means ‘Helmsman.’ During its inception, Kubernetes was a project that was outsourced by Google, and it was purely based on their experience of running containers on a massive scale.

When its all about counting features then Kubernetes is the one which is most natively integrated as compared to ‘Mesos’ and ‘Swarm.’ Google itself uses Kubernetes as its own Container as s Service(CaaS) platform, known as Google Container Engine. OpenShift, Red Hat and MS Azure are among some other platforms that support Kubernetes.

Kubernetes is purely built on YAML based deployment model, but it also supports JSON. YAML is highly recommended due to its user-friendly functionalities.  Docker is the most universally used container engine that is currently supported by Kubernetes and it also supports CoreOS rkt.

Secret feature management, load balancing, auto-scaling and overall volume management are some of the major built-in features present in Kubernetes.

Outshining other with a plethora of supported features, Kubernetes also require less third-party software as compared to Mesos and Swarm.  Thus, Kubernetes is sometimes regarded as more “opinionated” as compared to the other two orchestration engines.

Swarm CO Capabilities

Swarm is the Docker’s native COE, which was written in Go and got released in November 2015. Swarmkit is the Docker native version of Swarm included as of version 1.12, is a highly recommended version for those who are willing to use Swarm.

However, Swarm also has a YAML based deployment model using Docker Compose just like Kubernetes. Network security using TLS with a certificate authority, overlay networks with DNS and auto-healing clusters are some of the valuable functions which are included.

But, on the other hand, Swarm is yet to support external load balancing and native auto-scaling. Till date scaling have been done through third-party solutions, in the same way, Swarm includes ingress load balancing, but external load balancing would be done using a third-party load balancer such as AWS ELB.

Mesos CO Capabilities

Apache Mesos was basically developed by the PhD students of UC Berkeley. Though Apache Mesos was developed in 2016 however, its roots are connected way back to 2009. Apache Mesos was developed using C++.

Mesos approach is quite different from Kubernetes and Swarm, as it takes a more distributed approach towards managing cloud resources and data centers. Also, Mesos use Zookeeper to form a high-availability cluster to keep track of the other cluster states among the masters.

Other container management frameworks can be run on top of Mesos, including Kubernetes, Apache Aurora, Chronos, and Mesosphere Marathon. In addition, Mesosphere DC/OS, a distributed datacenter operating system, is based on Apache Mesos.

Complexity and flexibility are the two strong points of Mesos which has driven companies like Airbnb and Twitter to use Mesos and manage their large-scale applications. Also, Mesos has a steeper learning curve than Docker Swarm.

Choosing the right COE for your needs is always crucial. As we know that each COE has its own strengths and weaknesses, so a solid understanding of the particular use case will decide which is the most suitable COE for your application implementation.

Leave a Reply