2

I am trying to setup consul for service discovery. We have hosted our infrastructure on AWS Mumbai region (We use only one region). I was going through the consul documentation where it is mentioned that when we run consul as a cluster a minimum of (n+1)/2 nodes are required to be running.

The issue is that the Mumbai region has only two availability zones. So if one zone goes down then there is a possibility that there is only one server of consul running.

So the question is that if that happens will it be possible for the agents to still serve DNS requests if I am fine with having stale results. If no, then is there a way by which I can avoid failure with 2 availability zones.

  • 1
    This seems to be a very specific question that is not really software engineering - you may be able to reword it into a more general strategic question about strategies for ensuring availability of a service but otherwise you would be better asking on superuser or an AWS/Consul usergroup. – Steve Barnes Aug 31 '17 at 5:22
  • Maybe this is a specific case. But if you look at it, The main question is how do you achieve high availability for any system like elasticsearch, zookeeper etc. where there are quorum reads and writes and you have only two networks to deal with. There will always be the case that when the network with more instances goes down, the corresponding system will stop working. – pratikvasa Aug 31 '17 at 5:53
  • good question. I for one want to know the answer, which is probably going to be more interesting than just a manual entry – Ewan Aug 31 '17 at 6:17
1

The (n+1)/2 issue is a general problem with clustering and consensus / quorums. With only two availability zone, you cannot always guarantee a quorum in case one goes down.

Consul supports three consistency modes (see here near the bottom): default, consistent, and stale. Both the default and stale modes allow agents to serve possibly-stale data when responding to read requests, which is what you are looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.