0

We are developing a product that will work as a set of services deployed on-premises (e.g. in the local network of an office, factory, etc.). Since there can be lots of deployment targets for each customer and we want to minimize the configuration effort by automatizing as much as possible, we are thinking about using consul as solution for service discovery and configuration server. It meets our requirements and also provides mutual TLS auth between the services, making the whole set up more secure.

We have two basic requirements:

  • The deployment targets will be very diverse: some customers will deploy the software in the workstations of their employees (so those workstations could be turned off at the end of the day), some others will have dedicated servers, and most of them will have a combination both cases (one or two dedicated servers, and several workstations).
  • Every customer will have at least one machine that either will be never shut down or will be started before every other machine (that is granted because is this way of working is in the manual we give to our customers). We call this machine the master.

However, after doing research in the Internet and playing with Consul a lot, we still have some doubts about it. In particular, we would need advice on the requirement from Consul docs that you need a minimum of 3 instances in your cluster. Does it fit our use case in which it will be installed in the workstations of the employees of our customers, which can be shut down at any time (even given that one instance, the one we call master, will always be available)?

joanlofe
  • 103
  • 4

1 Answers1

1

Consul is not a good fit for your use case, because it expects to have a quorum of nodes available for consensus. It is also, like all distributed consensus systems, a finicky balky piece of sh... oftware, that'll cause more downtime than it'll prevent, until you spend a lot of time working out all its foibles.

I got a call from a former employer once, begging me to fix their hosed Consul cluster, because it had taken down everything, and they nobody who was still there knew how to sweet-talk it back to life.

Don't try to get fancy with service discovery; since you have one machine that is always going to be available, just stick some sort of database on there and go wild.

womble
  • 95,029
  • 29
  • 173
  • 228