Replica and Control over Consensus via Configuration

Hi,

I have a following 3 node cockroach setup where one of the node has network interface delay set at 100ms to simulate datacenter latency.

Is it possible to configure the replica consensus algorithm to prefer sl73tooldbd002 and sl73tooldbd004 nodes to agree? We want to make sure data is written to other data center before we return back to the client.

Why do you want to specifically make sure that the data is written to the other data center? If you’re concerned about an outage at the first data center, a single remote replica won’t save you - when the first data center goes down, you’ve lost a majority of your nodes so the remaining node won’t be able to serve traffic or recover on its own. In order to survive node failures, you need at least three nodes; to survive data center failures you need three data centers.

CockroachDB is designed for (roughly) symmetric network topologies. If two nodes are in the same datacenter and the third is remote, then the remote node is likely to fall behind and be less useful as a backup (or it may occasionally win an election and slow everything down).

Hmm,

The cockroach design makes sense.

We have three data centers practically. two are in the close by and the other is about 2000 miles away. I think I will place same amount of network interface delay to simulate network latency.

Thanx.

FYI,

This is the 3 secure node cluster we have decided to use for multi-datacenter simulation on RHEL 7.x. The latency is simulated via the linux /sbin/tc utility.