Read issue in MongoDB asynchronous replication -
i'm new mongodb. created java app using mongodb database. configured 3 servers in replica set. pseudo code: {
createuser getuser updateuser
}
here createuser creates user getuser fails return user in somtimes.
when analysed due data replication latency.
how can overcome issue?
is there anyway replicate data when created?
is there other way user without fail?
thx in advance!
if issue due replication latency, 1 thing can make sure writes safe , using w
flag. way, mongodb wait until data replicated @ least n
nodes before returning. can client driver well.
are reading slaveok=true
? if read replicaset primary, shouldn't issue either.
Comments
Post a Comment