DEV Community 👩‍💻👨‍💻


Posted on

Is there a point to use Docker Swarm on a single computer?

By now I understand the purpose of Docker itself and I've been using it for local development for quite a bit

The course I'm following introduces Docker Swarm by using it locally on a single machine, by making use of Virtual Machines (I think)

So that got me thinking, learning purposes aside, is there a benefit to use Docker Swarm on a single machine?

Thank you

Top comments (4)

akashicseer profile image
akashic seer

Testing a Microservice based application. You often have like 20 to 100 microservices you need to startup to do a full test on your app. I'd use another method though. I'll be writing an article about that soon. Because when testing a microservice app you want to use a CI/CD continuous integration and deployment pipeline so testing, pushing to repos etc. all need to be considered.

jouo profile image
Jashua Author

Would love to read that article! :D

akashicseer profile image
akashic seer

Basically, I'll be using a framework for Microservices known as Lagom which is Scala based. Lagom Fires up the pieces I need to run my microservices locally for testing. Then I push my code to Gitlab where it sits in a Repo. I can then use tools in Gitlab to prepare the code for the individual microservices and package them into docker container images and do testing etc. Then I use RedHat OpenShift to orchestrate all of the Docker images. Openshift uses Kubernetes underneath. Kubernetes is basically like Docker Swarm.

That basically describes an entire pipeline from development to production in super short steps. LOL However if I was not using Lagom for development, then locally I would need Docker Swarm or Kubernetes and I would have to create the images to run locally, yet still use a code repository. So I would be creating lots of one time use images. Lagom makes it easier supposedly.

Either way I will be writing an article in the near future about it on my website I'll probably make a video or videos too. The reason is I am building a unique social network and I will be giving away a partially created example/starter app to fellow developers to help demonstrate the platforms API. It will also demonstrate how to build an app based on Microservices.

I am using microservices because it will allow me to launch the app starting when it is only like 25% complete. I can then continue to build and add to it as I gain members until the day of Launch Here are some microservice resources

follow me on twitter to get announcements. I'll be making posts here too. I will be running a contest starting in a few weeks when the 25% is up, until the day of launch. The contests will be to help raise money. There will also be rewards for contests like most invites so you don't have to have money to play. It is crypto based so the contests will have value too.

It is something I have been planning for 10 years now. I had to wait for technology to change to offer some things and I had to teach myself everything.

ahferroin7 profile image
Austin S. Hemmelgarn

It lets you test distributed or microservice-based applications without needing a whole network or having to pay a cloud service provider to host it for you.

It's also a very good way to debug the clustering software itself, because it is often easier to manually induce various networking related failure modes on the virtualized network infrastructure that the VM's use than it is on real network infrastructure.

There may also be, somewhat surprisingly, positive performance implications. Not so much with Docker Swarm using VM's, or even with minkube, but I've seen Erlang/Elixir apps that perform better when run on multiple BEAM nodes instead of just one, even if all those BEAM nodes are on the same physical hardware.

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.