Ask HN: Docker Swarm Considered Harmful?

1 points by halis ↗ HN
I know that Kubernetes won the container orchestration war, for various reasons.

We decided to try out Docker Swarm for a service at work because: A) We had swarm-enabled servers available B) Docker EE with Kubernetes hasn't been rolled out yet C) We don't get to use a cloud provider to roll our own K8S cluster

While it was my understanding that Kubernetes was preferred, I really didn't see using Swarm as that big of a risk.

We aren't doing anything too crazy really. Spin up a stack with 1 redis container and maybe 2 or 3 stateless api containers.

But we have a lot of different environments and different containers for different offices. So we have a lot of stacks. Also, we're using Traefik to provide routing to the stacks, so they share a network.

I have to say, after using Swarm, it's been a nightmare. Granted our production swarm hums along fine, so that's good. But it's the lower environments that are giving us grief.

We have CI, DEV, QA and UAT all on the same swarm.

We have Jenkins jobs that poll our git repo and stand up CI stacks to run integration tests.

Things get really out of whack. When we stand up a stack we use "docker stack deploy" that mostly seems fine. But then something happens (root cause yet to be identified) and things go haywire.

We start seeing API services with container states of 1/3 or 1/2 or 0/1 etc And they never seem to come back up.

Sometimes we see nodes leave the swarm and come back. Sometimes we see nodes leave, become a leader in their own swarm and never come back.

We have identified "docker stack rm" as a big problem. If you start running this command, in our experience, be prepared to bring everything down because it is going to mess up networks, services, etc.

Do others have a similar experience with Docker Swarm? Or is this possibly just something dumb that we are doing, which is totally possible!

0 comments

[ 3.0 ms ] story [ 9.8 ms ] thread

No comments yet.