The purpose of this article is to take a quick look at some top options available as Docker orchestration solutions for an AWS environment. For me, personally, this is research for a business decision, but why not share the results?

I know, I know… just another comparison article. That’s completely fair, too. However, I often find myself searching for the latest articles like this when evaluating choices, so I figured it couldn’t hurt to get some recent analysis out there as well.

The Options

There are plenty of options in this space so we’ll need to pick a few promising options based on what we already know. Because this is a space that changes rapidly, I’m going to favor large communities that can truly keep up with the pace. For that reason alone, Docker’s Swarm Mode and Kubernetes will be included. I’ll also take a look at EC2 Container Service because it’d be silly not to since we’re on AWS, and finally Rancher because it takes a unique approach to solving these problems. Obviously there are many other great choices available but these interest me personally for one reason or another.

Swarm Mode — Docker | https://docs.docker.com/engine/swarm/

Kubernetes (K8S) — Google / CNCF | http://kubernetes.io/

EC2 Container Service (ECS) — Amazon | https://aws.amazon.com/ecs/

Rancher — Rancher Labs | http://rancher.com/

A Quick Overview

To hit a few high-level points that may or may not matter to you, here are a few items I decided to dive into that were important to me in some form or another. Medium doesn’t support tables, so bare with me here!

Installation

Swarm Mode: None — included with Docker binaries.

Kubernetes: Bash scripts and other specific utilities

ECS: Single Binary

Rancher: Docker Container

Job Definitions

Swarm Mode: Docker CLI

Kubernetes: YAML or JSON

ECS: JSON or Docker Compose

Rancher: Docker Compose + Rancher Compose

Popularity (Github)

Swarm Mode: 4,059 Stars (based on Docker Swarm)

Kubernetes: 17,604 Stars

ECS: 395 Stars (CLI Only, Not Open Source)

Rancher: 4,380 Stars

A Deeper Dive

With that out of the way, let’s take a deeper look into our options. The goal here is to evaluate the features of each option and determine what seems like a good fit for our use-case, and potential growth.

Swarm Mode

Previously called Docker Swarm, Swarm Mode has since been pulled into the Docker executable itself. This means it is automatically shipped with every system listed on this article and requires no further software to install — it even uses nearly identical CLI commands to single-node Docker systems.

Being part of Docker itself makes this an interesting area — you have to imagine that it will be getting a lot more development focus going forward. With that said, Swarm Mode is quite far behind some other options today, lacking options such as:

API gateway / URI routing

Autoscaling

Management or monitoring UI

Scheduled Jobs

Secrets Management

That’s not to say Swarm Mode is barebones by any means. It has already solved problems like dynamic port mapping (ex. running multiple containers on a specific port on the same host, without application awareness) and it handles service discovery with load balancing just fine by itself. Past that though, there are no real extras you’ll find here. Right now, I’d only recommend this option for the most basic of deployments but this may very-well change in the near future.

Kubernetes

Kubernetes is easily the most feature-rich in consideration here — it’s also the most complicated. Setting up a Kubernetes cluster alone can be quite the task with so many disconnected options: there’s always kube-up.sh, CoreOS’s core-aws option, or the latest option of kops which targets not only AWS cluster creation but also the ongoing management of it.

If getting Kubernetes up and running hasn’t scared you off, the set of features it provides is rather incredible. In addition to solving the basics you’ll find in any orchestrator, it also provides enough to help solve nearly any deployment problem you can think of:

I had to cut myself off from rambling on with this list. Kubernetes is simply jam-packed with features — and the community behind it is quite amazing.

EC2 Container Service

ECS is the managed option from AWS. Until recently, I had a huge gripe with this option in that it didn’t solve the dynamic port mapping problem (explained above). This meant that if you had two services exposing port 80, there was no way to run them both on the same instance due to container-to-host port mappings being bound. Using different ports for each instance of the application doesn’t work since ELBs cannot target different ports for the same request.

Recently this has been solved by integrating ECS with Application Load Balancers (ALBs), which were introduced by AWS earlier this year. This makes ECS a much better contender in my opinion.

With these changes, ECS does provide some nice features:

API gateway using ALBs

EC2 Instance Autoscaling

Rolling Updates

IAM Integration

One thing that does bother me a bit with this option, though, is that being closed-source there is no way to truly run an ECS environment locally and achieve that development-to-production parity.

Assuming that doesn’t bother you and vendor lock-in isn’t a concern, ECS is a very viable option for low to mid-complexity deployments on AWS. It does miss out on some advanced features found in other systems but if you’re just looking to deploy services with zero-downtime rolling updates and have some control over the routing, this is a great choice. Integration with IAM for security is a very convenient benefit as well.

Rancher

Rancher takes a completely different approach here, making it a little difficult to evaluate. Instead of trying to beat the competition, Rancher is attempting to abstract away the choices by giving you a consistent interface to use Docker Swarm, Kubernetes, Mesos, or their own scheduler called Cattle.

For it’s [relatively] smaller community and company, Rancher is doing very well keeping up in this space. Using the Cattle scheduler, you get a great system with some of the essentials:

Management and Monitoring UI

API gateway / URI routing

Sidekick Containers

Single-Node support

If that isn’t enough, you can always swap out Cattle for Kubernetes and get access to every feature in Kubernetes!

The installation of Rancher is one of the really neat features here. Both the server and client are Docker images, making it very easy to deploy to an existing system… or even locally. Let me also just say that Rancher’s management UI is simply stunning — far above the competition, including Kubernetes Dashboard.

Conclusion

This is tough. Every option has it’s benefits and drawbacks. As much as I’d like to go with the “there is no right choice” route, I’ll at least offer the closure of providing my choices.

With the limited features of Swarm Mode and the lack of a local parity option for ECS, my decision based on personal demands came down to Kubernetes and Rancher — I’ve decided to go with Kubernetes. Why? Because I’m working with a large and complex system with many moving parts and I want to handle the complexity of requests going forward.

While Rancher is capable of abstracting away the complexity of creating a Kubernetes cluster, I felt that running an abstraction that may potentially introduce issues isolated from the greater Kubernetes community could lead to a limited set of available support.

As for the complexity of creating a Kubernetes cluster, tools like Kops have taken great steps to improving that experience. If you have looked at Kubernetes in the past and turned away after seeing kube-up.sh, I highly recommend you give Kops a try.

With all that said, I use and will continue to use Rancher for my personal projects. Kubernetes is more demanding on resources, requiring at least an m4-series EC2 for the master, and a t2.medium or higher for the nodes. With Rancher, you can run the client and server containers on the same t2.micro instance without an issue — this gives you that beautiful UI without the overhead of separate and expensive server instances to support.

Swarm Mode and EC2 Container Services have both seen major updates recently so I wouldn’t take my eyes off them quite yet. They may fit your criteria already, but if not, keep your eyes open… this space moves quick!