Docker Swarm: Why Reports of Its Death Are Greatly Exaggerated

docker swarm
Written by Pavan Belagatti

Think Kubernetes is beating Docker Swarm hands-down? Not so fast, says PAVAN BELAGATTI. Here’s why it’s not the right comparison.

If you were just going by the Google Trends line, you’d think Kubernetes is beating Docker Swarm hands down.

But is that a valid proof that Kubernetes is winning?

No way.

The fact is, Docker adoption is still growing exponentially. More and more companies are using it in production, too. After all, it’s important to use an orchestration platform to scale and manage your containers.

PAVAN BELAGATTI

Here’s what you need to know about Docker Swarm vs Kubernetes right now.

Scaling Up

Imagine a situation where you have been using Docker for a little while, and have deployed on a few different servers. Your application starts getting massive traffic, and you need to scale up fast, how will you go from three servers to the 40 servers you will need?

And how will you decide which container should go where? How would you monitor all these containers and make sure they are restarted if they exit?

This is where Kubernetes comes in.

Now, you are probably wondering if you couldn’t just easily achieve the same result with Docker Swarm, and with far less complexity, too.

Well, hang on. Because it’s not that easy to compare Kubernetes and Docker Swarm.

After all, Docker Swarm is for environments where simplicity and fast development are critical. Whereas Kubernetes is fit for the environments where medium to large clusters are running complex applications.

There’s no question that Kubernetes gets a lot of attention. The Kubernetes project on GitHub has over 1500 contributors who are constantly releasing tons of tooling, extensions and so on. That’s a huge community of support. .

But it isn’t always the best choice. The question of Docker Swarm vs Kubernetes is one that you can only answer based on what types of applications you are running. There are also other considerations to keep in mind, like ease of installation and setup, logging and monitoring and overall scalability.

For example, when it comes to installation and setup, Docker Swarm wins. It’s elegant, easy to install and you can set it up quickly. Kubernetes, on the other hand, is more complex. And there’s a steep learning curve to deal with, too.

Docker now is officially backing both Swarm and Kubernetes, of course. That’s another reason why some people are saying that Kubernetes has won. They expect Docker to spend less energy on promoting Swarm or promoting that as a preferred solution, and we would not be surprised to see it eventually disappear.

But still, should we still be comparing both? Let’s talk about some stats

According to RightScale 2019 State of the Cloud Report, Docker and Kubernetes both are winning the game: Kubernetes usage rose from 27 percent to 48 percent.

A quarterly report on developer trends in the cloud by Digital Ocean shows this trend below when it comes to container orchestration platform usage. While Kubernetes was most popular overall, the smallest companies (1-5 employees) use Docker Swarm more often (41 percent use Swarm vs. 31 percent that use Kubernetes).

A little perspective

At DockerCon 2018 EU and DockerCon 2019, new Swarm features were released that further validate the platform.

The numbers look good, too. It turns out that startup use of Swarm is definitely rising. And, it’s worth noting, a vast majority of Docker’s some 700 plus customers use Swarm.

The bottom line is, it’s a Kubernetes era. But other tools can enhance the mix and help you do the job in a much more sophisticated way.

The focus shouldn’t be on fancy and trending tools, of course. The main goal is just to build something stable — something that customers love to use. Every tool has its own advantages and disadvantages, after all.

Reports of the death of the Swarm are, as Mark Twain said, greatly exaggerated.

For aNewDomain, I’m Pavan Belagatti.

Cover image: Heptio