Comment by robertlagrant

2 years ago

Replica is ambiguous here: is it 1 leader and n replicas? Or is it just n replicas, one of which is assigned "leader"?

I thought "these systems follow a leader/replica model" would be the former, but "f failures with f+1 replicas" the latter.

It's a cluster size of n replicas, with one of the n being the (current) leader.

f failures with f+1 replicas is a cluster size of n replicas can sustain n-1 failures. n=f+1 or f=n-1. You wanna be able to sustain f failures, you need a cluster size (n) of f+1.

When there is a failure, a non-failing node becomes the leader (or there's no leader change if the current leader isn't the one that failed). A cluster size of 1 has 1 leader, and can sustain 0 failures.

It is same for all CP systems in terms of CAP. During partition, clients that have access to the leader, could read/write. Clients that have access to non-leader servers could only read consistent data to the point when non-leader lost connection to the leader (i.e. old data, but still consistent).