Cluster with only two server


I’m trying to use EventStore but we have a problem. We have only two datacenters and we must continue to work if one of the two datacenters does not respond (LAN issue, etc…).

If we create two instance of EventStore (one on each datacenter), we cannot use clustering because we do not have 3 instances (2n+1).

But I’ve tried the following and it seems to work :

Lets say we have instances 1 and 2 on the first datacenter and instances 3 and 4 on the second datacenter.

I’ve declared that instance 1 is in a three nodes cluster with instance 2 and instance 3

I’ve declared that instance 2 is in a three nodes cluster with instance 1 and instance 4

I’ve declared that instance 3 is in a three nodes cluster with instance 4 and instance 1

I’ve declared that instance 4 is in a three nodes cluster with instance 3 and instance 2

When my four instances are up, I’ve a master, two slaves and one clone. With this configuration, I can have 2 instances down, the 2 up instances still work, replicate, …

When I restart the down instances, the down instances update their database.

Is it a supported scenario or am I lucky this works ?



What happens when both sites are up but can’t talk to each other because the network between them is down?


If James was not clear with his question… You will end up in split brain. What you probably want to do instead is drop a 3rd node in AWS etc. Given the algorithm of the replication model (paxos) in order to keep consistency you need 3 DCs not 2. With 2 DCs both sides can form a minority partition with 4 nodes and a quorum size of 2 (if configured this way). As such you can end up in split brain where both sides think they have properly elected a master and accept writes. This can in some circumstances actually be a desired behaviour but you need to make sure you understand what is going on.

There is a new replication model being worked on that will allow for two data centers but it trades of the consistency guarantee.