Lets say we have 1 cluster with 4 nodes, 2 nodes in US, and 2 nodes in the Europe.
we have replication for the bucket set to 2 (so this means 3 nodes will have the same document, after replication).
My question is…
When a read request comes into the cluster, will it:
- read from the closest or more performent node? (are the reads sent in parellel to multiple nodes, and the fist result wins?) (I am currently assuming a get request by the primary key).
lets assume nodes 1,2,3 have the document in question, and the read request is received on node 4.
now lets assume the latency hit from node 4 to nodes 1,2 are say 1 second…but to between 3 & 4 its only 20ms…will the document in question come from the node 3 (always…or this entirely random)?
As a side question:
if replication is set to 2 (meaning the document should be replicated to additional nodes besides the master), and we do a set() with replicateTo.TWO, what will happen if 2 of the 4 nodes down? will this fail, or will it return success? I’m assuming it will fail. (is there a way to ‘have it succeed’ even if it can only replicate to 1 node, iff the 2nd replicate it needs to acquire is simply not available).
I’m hoping to be able to test this out in the next few days…(