Replication Factor Question



I have a question on a replication factor. Let say I am using 1 loadbalancer, 9 webserver, 3 dbserver with aerospike as a cluster.

Excerpt from Aerospike documentation, “In Aerospike the replication-factor controls the number of copies of each record will reside in the cluster. Most users use a replication-factor of 2 which ensures all of your data can survive a single node failure.”

So how does that work if I were to plug in 1 lb, with 9 web servers split to 3 web servers for each db server with replication factor 2. How does it decides which server getting which copy? This is because I have to ensure that the server db01 has all of the db entries from db02/3 and vice versa.


Hi Martin,

Thanks for your question. I am not sure I fully understand it though. Let me go over Aerospike’s data distribution which is explained in this document.

To summarise:

Objects (entries) are assigned partitions based on a hashing algorithm and, for replication factor 2, a partition has a master copy and replica copy each assigned a different node in the cluster.

So one cannot control on which node the data ends up, except if you set your replication factor to be equal to the number of nodes, in which case each node has all the data.

The client will have the partition map (which maps each partition - master and replica - to the node owning it) and will use it to get to the data. So each client will access all nodes in the cluster.

If this doesn’t answer the question, please provide a bit more details so I can understand it fully.