With big brands like Adidas flocking from Docker Swarm to Kubernetes for its eCommerce platform, we thought it's time to chat with you about these containerization applications.
Developers, you may want to skip to the next section. But for our non-developer-savvy folks, we’ll give you a quick, high-level run-through to explain this technology, so buckle up.
Software containers are much like shipping containers. Each software container is packed with everything your app needs to run – your code, operating system, any dependencies, complicated tech stuff, etc. – and essentially allows your app to run anywhere. Because these containers are easily portable, you can store a bunch of independent containers on a single computer without apps or systems interfering with one another – just like a cargo ship holds a bunch of containers, each with different products inside.
Before containerization technology, isolated applications required a whole new server to run. Every time you’d introduce a new isolated app, you’d spin up a new server. While we can deploy new apps side by side, they have to share resources and security contexts. The cost and difficulty in setup involved in isolating apps in a dedicated VM or server.
And in the world of cloud-based applications, this model can’t really sustain itself. Imagine how astronomical shipping costs would be if you needed to spin up a new ship dedicated solely to each product you needed to move. Thankfully, this is not a problem when using containers.
That’s why containerization applications are so important. Of course, we’re giving you the short version. If you want to go more in depth, the good folks at Tech Crunch have a great article explaining what containers are.
Before we move on, though, here’s the last piece of info you need to get caught up: Docker is a management tool that allows you to create these containers.
But then you have these competing platforms that are used to orchestrate the containers: the biggest competitors are Kubernetes and Docker’s own system (Docker Swarm). Amazon ECS is another growing in popularity, but for now, we can cross that one off our list. Why? Amazon ECS is tied to other Amazon services – making it far less portable and movable to other hosting platforms (in short, not our favorite solution).
If you can’t decide between these options, our development team breaks down some of the pros and cons as well as our preferred method.
Swarm is Docker’s native solution. It’s used to manage and orchestrate clusters embedded in the Docker Engine. Swarm clusters consist of multiple Docker hosts that can act as manager hosts, performing management and orchestration, and worker hosts which run swarm services.
Kubernetes is an open-source orchestrator platform developed by Google for automating container management and deployment. Unlike Swarm, the basic deployable object in Kubernetes is a Pod, consisting of one or several containers that run in a shared context. Because Kubernetes is more robust and offers much more customization, it is more difficult and time-consuming to set up on the front end.
We asked our software architecture director, William Jerla, the question: Docker Swarm or Kubernetes?
“Our stance on Docker vs. Kubernetes is that we like them both. We use Docker for containers and Kubernetes to orchestrate them. There has been a big fuss about Docker Swarm vs. Kubernetes for container orchestration, but we found that Kubernetes is more robust and somewhat a standard for orchestration in the development community. This basically means we get more features with Kubernetes and better support from the community in terms of learning and solving problems.”
There you have it. Each platform comes with its own pros and cons, but ultimately, your choice depends on your preferences and experiences.
Don’t just take our word for it. Here are other readings to help you in your Kubernetes/Docker Swarm research.
Published on: June 18, 2018 by Donny Lamey