Currently, aerospike has 2 policy values for (read) replica:
any, the latter of which means “a random choice of which replica to read”. I would like to suggest other policy values,
closest, which means “read from the replica which has lowest latency”, and/or
local, "read from unix socket/loopback interface if applicable, otherwise from
My use case: we are planning to use aerospike for session storage. We have 4 web instances running behind a load balancer in share-nothing manner. On each of these 4 instances, we will install an aerospike agent with
replication-factor=4, ie 1 node will be master, and the rest in the cluster will have replicated data. To speed up read, it is preferred that the web app in each instance read from local aerospike, instead of randomly from the any of the instance of the cluster.