DEV Community

Jashua
Jashua

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 (2)

Collapse
 
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.

Collapse
 
jouo profile image
Jashua

Would love to read that article! :D