Hi Felix, nice and very useful article that summarizes a lot of work on your part!
kelly stirman

Hi Kelly, thanks a lot for your response and your thorough proof-reading!

Update anywhere is of course an error. We will also mention the in-memory storage engine and make a clearer distinction in the article between open-source and commercial features.

The question whether MongoDB is fully elastic is difficult. Elasticity also implies the ability to scale in. In contrast to Cassndra or Riak, one cannot simple take away nodes from a MongoDB cluster since the scaling unit is a replica set, not individual nodes. So the process of scaling is much more complicated and error-prone. Even more so because the migration is handled by the mongos load balancers, not peer-to-peer. This is why we see MongoDB as scalable but elasticity is more questionable: simple adding and removing of nodes does not suffice.

In terms of ACID I’ll have to completely disagree. There is no such thing as single-record ACID, it is a missleading marketing term. Single record updates can be consistent (linearizable) or not but they do not constitute a transaction (see here). The correctness criterion of isolation (the I in ACID) is serializability. Serializability is only defined and meaningful for operations that span multiple records, demanding that there is an equivalent serial execution to the interleaved transactional operations that yields the same results and produces the same outputs. On a single record there in no interleaving and thus no concurrency anomalies (dirty write, dirty read, lost update, non-repeatable read, phantom read) to avoid.

So given the highest write concerns and read preferences (and ignoring bugs) MongoDB is linearizable — but it is to no extent ACID. By your definition any consistent database would automatically be ACID. Even on a single document in MongoDB a read-modify-write pattern is not possible without hand-crafted concurrency control mechanisms based on findAndModify operations with version checks.

By the way, I’m not telling this because I dislike MongoDB but to keep communication between database vendors and users honest. As happy production users of MongoDB, we have actually built a transaction layer on top of distributed MongoDB clusters that offers ACID using optimistic concurrency control, that is not yet announced. In the article for the release, I will talk about the distinction between ACID and consistency in much more detail.

Show your support

Clapping shows how much you appreciated Felix Gessert’s story.