by enigma1510 · 13y ago · 0 comments
The post contains the 'straw man' informal fallacy - ie. standing up an absurd scenario in order to knock it down.
Mongo provides write concerns for several use cases. Those concerns are:
NONE NORMAL SAFE FSYNC_SAFE REPLICAS_SAFE
The author focuses on the write concern NONE - a write concern that is provided for the 'fire and forget' use case. To choose NONE and expect guarantees and fault tolerance is simply user error.
The post focuses on the least safe mode (NONE), and barely touches on REPLICA_SAFE at the end of the article. Leaving the reader to wait for "a future blog post".
Choose the tool and configuration for the job. For a Mongo user that needs fault tolerance and consistency guarantees, I would recommend (based on documentation) choosing a configuration that attempts to provide those.
The safest server configuration would be a multi-node replica set (3 or 5) that spans multiple data centers (preferably 3 or more). The safest client configuration would be a write concern REPLICA_SET (majority).
If you have examples of Mongo not providing fault tolerance in this setup, the world would be a better place if you shared.
It's hard writing for the "tl;dr"-generation (as this exchange demonstrates -- there was a time when it used to be embarrassing to have someone say the same thing twice to you in a discussion).
I'll have a separate blog entry on why REPLICA_SAFE is broken, and how the setup you outlined can lose data.