Company
Date Published
Author
MongoDB
Word count
324
Language
English
Hacker News points
None

Summary

MongoDB Version 1.8 introduces journaling in its storage engine for crash safety and fast recovery, allowing data to replicate even if journal write has not occurred or been confirmed. In a replica set, the freshest node is elected primary, ensuring that if a crashed node comes back up, it will be primary and data can still be rolled forward despite cascading failures. A write is truly committed when written at a majority of set members, which can be confirmed using the getLastError command. The quick replication allows for minimized latency between secondaries and primaries, as well as reducing the time to fsync disks, enabling both processes to run concurrently.