What’s the purpose of docker swarm?

  r/docker

I just can't see a use case for it. But I do see lots of problem with it. (I'm new with docker swarm, please correct me if I'm wrong)

For example, let's say we have a 3-node (node1, node2, node3) swarm. And we have nginx of replicas 2 on the swarm. Let's assume they are run on node1 and node2 respectively. Since we don't know where these nginx are actually running, but we can access the service by going to any of the node (http://node1, http://node2, http://node3). So I guess I should use round robin DNS to realize the load balance??? But what if one of the node fails???

If I happen to access the service by going to node3 (because of the round robin DNS), then node 3 has to access node1 or node2 to get the result for me, what a waste of recources…

Edit: Thanks a lot for the advice for other alternatives. But I'm trying to find out the purpose of docker swarm itself here.

submitted by /u/yukiiiiii2008
[link] [comments]
Source: Reddit

LEAVE A COMMENT