Say we have three nodes(simple replica no sharding) i.e. N1,N2 and N3 with replication factor as 3.
As read and write request can go to any node, Say Request write request(to update the same record at same time) comes and goes node N1.
Read request comes to read the same document and goes to node N2. I believe it will return stale data as write is not replicated to N2 yet ? Consider the default configuration where i have not tuned the read and write concerns.
I believe problem in step2 can be resolved with either of below options
a. In synch replication, Good for strong consistency but bad for performance
b. Tuning read and write consistency as explained at read and write consistency
c. With the help of sharding(if required), where shard key will ensure all read and writes goes to particular node for particular shard key ?
Is my understanding in point 2 and 3 correct?