Support for special arbitrator zone for replication

Suppose one is limited to three distinct data centers (or nodes), but one of those data centers cannot serve reads or writes directly and is simply going to be used to achieve raft consensus. Does CRDB have any kind of support for this kind of configuration? The idea is that if one of the “real” data centers failed, one could fail over to the other real data center by virtue of the “arbitrator” data center, which maintains a raft log, but does not have a state machine to serve reads or writes.

No, this is not supported - each replica maintains all the data of the range, not just the log.

In the raft consensus protocol, every replica must be able to become the leader; follower-only nodes would count as “failed” in some sense and would reduce the cluster’s ability to tolerate “true” failures. So all replicas must process at least enough of the raft log to be able to become the leader (which basically means tracking the membership of the cluster, which is maintained through the state machine). However, because of the way we reuse cockroachdb’s general transaction mechanism for membership changes, it’s not possible for a replica to only implement enough of the state machine to track the membership of the cluster; it needs to implement the whole thing and track the entire state of the state machine.

1 Like