Hacker News new | ask | show | jobs
by RRRA 3525 days ago
So a single node Consul cluster, when rejoining itself with a custom ID, would end up a leader of "itself" and not wait for the previous IP as a follower, forever? :)

Which option would that be for a server config?

https://www.consul.io/docs/agent/options.html

2 comments

I think I'm a little confused by what you are asking - are you wanting to run a consul server and agent on the same instance? You can do that and specify an ID appropriate to the consul service type for multi-tenancy situations of master nodes and client nodes. But that would be up to you given your deployment environments.

Are you wanting to have a single consul service running for the whole environment (as client and server)? If you're running an HA environment you should really have dedicated master nodes and non-voting clients for service discovery on instances. The member states of consul clusters have an IP and ID, are you saying that the IP could be mixed with a different ID (it could in the cloud, but upon connecting to the leader it would update its registered information).

Are you talking about cleaning up old instances registered in the cluster? Or that there could be a single master node which has a broken network connection to the other master nodes, so sees different cluster status information? In that case, you should be monitoring all your services. Always. There are a lot of tools out there which will clean up and correct voting clusters in those situations. We use Sensu and Kubernetes checks / services for a lot of monitoring and automatic reaction to changes in cluster health.

This was actually an issue in previous versions, in (I believe 0.7) after a timeout (reconnect_timeout and reconnect_timeout_wan in options) a node will be completely removed.
0.7.0 is the latest version of consul
And it still is an issue