Aerospike cluster behavior in different consistency mode?

239 views Asked by At

I want to understand the behavior of aerospike in different consistancy mode.

Consider a aerospike cluster running with 3 nodes and replication factor 3.

AP modes is simple and it says

Aerospike will allow reads and writes in every sub-cluster.

And Maximum no. of node which can go down < 3 (replication factor)

For aerospike strong consistency it says

Note that the only successful writes are those made on replication-factor number of nodes. Every other write is unsuccessful

Does this really means the no writes are allowed if available nodes < replication factor.

And then same document says

All writes are committed to every replica before the system returns success to the client. In case one of the replica writes fails, the master will ensure that the write is completed to the appropriate number of replicas within the cluster (or sub cluster in case the system has been compromised.)

what does appropriate number of replica means ?

So if I lose one node from my 3 node cluster with strong consistency and replication factor 3 , I will not be able to wright data ?

2

There are 2 answers

3
Meher On

You are correct, with 3 nodes and RF 3, losing one node means the cluster will not be able to successfully take write transactions since it wouldn't be able to write the required number of copies (3 in this case).

Appropriate number of replicas means a number of replicas that would match the replication factor configured.

0
kporter On

For aerospike strong consistency it says

Note that the only successful writes are those made on replication-factor number of nodes. Every other write is unsuccessful

Does this really means the no writes are allowed if available nodes < replication factor.

Yes, if there are fewer than replication-factor nodes then it is impossible to meet the user specified replication-factor.

All writes are committed to every replica before the system returns success to the client. In case one of the replica writes fails, the master will ensure that the write is completed to the appropriate number of replicas within the cluster (or sub cluster in case the system has been compromised.)

what does appropriate number of replica means ?

It means replication-factor nodes must receive the write. When a node fails, a new node can be promoted to replica status until either the node returns or an operator registers a new roster (cluster membership list).

So if I lose one node from my 3 node cluster with strong consistency and replication factor 3 , I will not be able to wright data ?

Yes, so having all nodes a replicas wouldn't be a very useful configuration. Replication-factor 3 allows up to 2 nodes to be down, but only if the remaining nodes are able to satisfy the replication-factor. So for replication-factor 3 you would probably want to run with a minimum of 5 nodes.