MongoDB allows you to tune the level of consistency you achieve by
controlling (a) whether you read from the primary only, or from
secondaries, and (b) when you write, how many nodes you wish to
acknowledge the write before control returns to the writing process
(this is useful for read-your-own-writes, for instance). MongoDB also
uses an in-order replication protocol such that a read from any given
node, once it succeeds (i.e. some particular write can be read from
some particular secondary), it will never not succeed when reading
from that node.
As you point out, there are some situations around failures and fail
overs in which the writes can seem to disappear. They will eventually
show up on all secondaries, but this can take some time depending on
the read and write load, network conditions, etc.
None of the 10gen drivers support detection of this sort of
"violation" of MRC. If it is critical to your application to always
have monotonic read consistency, you should read from the primary
only, as this offers the strongest consistency guarantees.
- Dan
On Apr 25, 12:15 pm, dhsieh <
dhsi...@gmail.com> wrote:
> Inhttp://
blog.mongodb.org/post/523516007/on-distributed-consistency-par...,