Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Marathon vs Kubernetes vs Docker Swarm on DC/OS with Docker containers

I'm looking for some pros and cons of whether to go with Marathon and Chronos, Docker Swarm or Kubernetes when running Docker containers on DC/OS.

For example, when is it better to use Marathon/Chronos than Kubernetes and vice versa?

Right now I'm mostly into experimenting but hopefully we'll start using one of these services in production after the summer. This may disqualify Docker Swarm since I'm not sure if it'll be production ready by then.

What I like about Docker Swarm is that it's essentially just "Docker commands" and you don't have to learn something completely new. We're already using docker-compose and that will work out of the box with Docker Swarm (at least in theory) so that would be a big plus. My main concern with Docker Swarm is if it'll cover all use cases required to run a system in production.

like image 907
Johan Avatar asked Mar 22 '15 19:03

Johan


People also ask

Which is better Kubernetes or Docker Swarm?

Docker Swarm provides high availability as you can easily duplicate the microservices in Docker Swarm. Moreover, Docker Swarm has a faster deployment time. On the other hand, it doesn't provide automatic scaling. Kubernetes is by nature highly available, fault tolerant, and self-healing.

What are the differences between Docker compose Docker swarm and Kubernetes?

What is the difference between these three? I can sum it up in a single sentence: Docker (or specifically, the docker command) is used to manage individual containers, docker-compose is used to manage multi-container applications and Kubernetes is a container orchestration tool.

Do people still use Docker Swarm?

As mentioned in the previous paragraph, Swarm remains to be utilized by both Docker and Kubernetes as a core engine for container storage. Granted that Kubernetes is in a dominant position on the market right now, its adoption and usage of Swarm continue to be in the spotlight.

What is the difference between Docker and Docker Swarm?

The difference between Docker Swarm and Docker Compose is that Compose is used for configuring multiple containers in the same host. Docker Swarm is different in that it is a container orchestration tool. This means that Docker Swarm lets you connect containers to multiple hosts similar to Kubernetes.


2 Answers

I'll try to break down the unique aspects of each container orchestration framework on Mesos.

Use Docker Swarm if:

  • You want to use the familiar Docker API to launch Docker containers on Mesos.
  • Swarm may eventually provide an API to talk to Kubernetes (even K8s-Mesos) too.
  • See: http://www.techrepublic.com/article/docker-and-mesos-like-peanut-butter-and-jelly/

Use Kubernetes-Mesos if:

  • You want to launch K8s Pods, which are groups of containers co-scheduled and co-located together, sharing resources.
  • You want to launch a service alongside one or more sidekick containers (e.g. log archiver, metrics monitor) that live next to the parent container.
  • You want to use the K8s label-based service-discovery, load-balancing, and replication control.
  • See http://kubernetesio.blogspot.com/2015/04/kubernetes-and-mesosphere-dcos.html

Use Marathon if:

  • You want to launch Docker or non-Docker long-running apps/services.
  • You want to use Mesos attributes for constraint-based scheduling.
  • You want to use Application Groups and Dependencies to launch, scale, or upgrade related services.
  • You want to use health checks to automatically restart unhealthy services or rollback unhealthy deployments/upgrades.
  • You want to integrate HAProxy or Consul for service discovery.
  • You want to launch and monitor apps through a web UI or REST API.
  • You want to use a framework built from the start with Mesos in mind.

Use Chronos if:

  • You want to launch Docker or non-Docker tasks that are expected to exit.
  • You want to schedule a task to run at a specific time/schedule (a la cron).
  • You want to schedule a DAG workflow of dependent tasks.
  • You want to launch and monitor jobs through a web UI or REST API.
  • You want to use a framework built from the start with Mesos in mind.
like image 106
Adam Avatar answered Sep 18 '22 04:09

Adam


Though it's a bit outdated, it may be helpful to read What's the difference between Apache's Mesos and Google's Kubernetes, to get some of the basics right. Also, note that Mesos operates on a different level than Kubernetes/Marathon/Chronos. Last but not least, see Docker Swarm + Mesos by Timothy Chen, keeping in mind that Marathon and Swarm can operate simultaneously on the same Mesos cluster.

like image 22
Michael Hausenblas Avatar answered Sep 22 '22 04:09

Michael Hausenblas