tlp
tlp

Reputation: 129

Docker swarm with consul

I am new with docker swarm and I'm having ambitious to deploy my application with docker swarm.

With the docker swarm, it has itself discovery service but I googled around and found out people are mentioning about the Consul as discovery service.

My question is. What is the advantage of Consul? Why don't we just use default discovery service?

Thanks,

Upvotes: 0

Views: 601

Answers (2)

Jagatveer Singh
Jagatveer Singh

Reputation: 195

Let us first look at the scope of service discovery provided by both swarm and Consul.

Swarm is to fascilitate service discovery on your docker network/infra only, while consul can be used with almost anything if you know how to use it, be it a monolythic application or a microservice, consul gives you all of that at one place.

Secondly, even though Swarm is great to handle a small infrastructure loads, it doesn't really go well with handling high production loads for a resource heavy infrastructure. This is why there are other tools in existance, for example kubernetes, ECS etc.

So considering that you have an application which you know is going to grow, I would rather go for a solution that works well with whatever I may try in future without having to change too much and works well with scaling on any IaaS provider. Hope that helps.

Upvotes: 0

Zoheb Nawaz
Zoheb Nawaz

Reputation: 117

Consul was used as a service discovery module in the standalone Swarm (prior to docker 1.12). However, since docker 1.12, Swarm mode was introduced with comes with default discovery service. So you don't need an external store.

Key point to notice is that if you had a swarm with an external store like consul, it would still have some data/metadata that needs to be preserved. Hence the use of Consul still exists.

Upvotes: 1

Related Questions