Abstract
Distributed databases offer high availability but can impose high costs on client applications in order to maintain strong consistency at all times. MongoDB is a document oriented database whose replication system provides a variety of consistency levels allowing client applications to select the trade-offs they want to make when it comes to consistency and latency, at a per operation level. In this paper we discuss the tunable consistency models in MongoDB replication and their utility for application developers. We discuss how the MongoDB replication system's speculative execution model and data rollback protocol help make this spectrum of consistency levels possible. We also present case studies of how these consistency levels are used in real world applications, along with a characterization of their performance benefits and trade-offs.
- D. Abadi. Consistency tradeoffs in modern distributed database system design: Cap is only part of the story. Computer, 45(2):37--42, Feb 2012. Google ScholarDigital Library
- H. Berenson, P. Bernstein, J. Gray, J. Melton, E. O'Neil, and P. O'Neil. A critique of ansi sql isolation levels. In Proceedings of the 1995 ACM SIGMOD International Conference on Management of Data, SIGMOD '95, pages 1--10, New York, NY, USA, 1995. ACM. Google ScholarDigital Library
- BSON Specification. http://bsonspec.org/. Accessed: 2019-02-04.Google Scholar
- Examples of read consistency levels. https://docs.datastax.eom/en/cassandra/3.0/cassandra/dml/dmlClientRequestsReadExp.html. Accessed: 2019-02-12.Google Scholar
- P. Garraghan, P. Townend, and J. Xu. An Empirical Failure-Analysis of a Large-Scale Cloud Computing Environment. In 2014 IEEE 15th International Symposium on High-Assurance Systems Engineering, pages 113--120, Jan 2014. Google ScholarDigital Library
- Group Replication Background. https://dev.mysql.com/doc/refman/8.0/en/group-replication-background.html. Accessed: 2019-02-12.Google Scholar
- Group Replication - Consistent Reads. https://mysqlhighavailability.com/group-replication-consistent-reads/. Accessed: 2019-02-12.Google Scholar
- M. P. Herlihy and J. M. Wing. Linearizability: A correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst., 12(3):463--492, July 1990. Google ScholarDigital Library
- How is the consistency level configured? https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlConfigConsistency.html. Accessed: 2019-02-12.Google Scholar
- D. Jordan. Sdam monitoring specification. https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst, 2016--2018.Google Scholar
- D. Ongaro and J. Ousterhout. In search of an understandable consensus algorithm. In Proceedings of the 2014 USENIX Conference on USENIX Annual Technical Conference, USENIX ATC'14, pages 305--320, Berkeley, CA, USA, 2014. USENIX Association. Google ScholarDigital Library
- Postgres Failover. https://www.postgresql.org/docs/9.1/warm-standby-failover.html. Accessed: 2019-02-12.Google Scholar
- Postgres Synchronous Replication. https://www.postgresql.org/docs/9.1/warm-standby.html#SYNCHRONOUS-REPLICATION. Accessed: 2019-02-12.Google Scholar
- D. B. Terry, A. J. Demers, K. Petersen, M. Spreitzer, M. Theimer, and B. B. Welch. Session guarantees for weakly consistent replicated data. In PDIS, 1994. Google ScholarDigital Library
- M. Tyulenev, A. Schwerin, A. Kamsky, R. Tan, A. Cabral, and J. Mulrow. Implementation of cluster-wide logical clock and causal consistency in mongodb. In Proceedings of the 2019 International Conference on Management of Data, SIGMOD '19, 2019. Google ScholarDigital Library
- Using Oracle GoldenGate for Oracle Database: Automatic Conflict Detection and Resolution. https://docs.oracle.com/en/middleware/goldengate/core/18.1/oracle-db/automatic-conflict-detection-and-resolution2.html#GUID-EB3D5499-7F28-45B6-A64E-53BF786E32A5. Accessed: 2019-02-12.Google Scholar
Index Terms
- Tunable consistency in MongoDB
Recommendations
Comparing NoSQL MongoDB to an SQL DB
ACMSE '13: Proceedings of the 51st ACM Southeast ConferenceNoSQL database solutions are becoming more and more prevalent in a world currently dominated by SQL relational databases. NoSQL databases were designed to provide database solutions for large volumes of data that is not structured. However, the ...
Checking Causal Consistency of MongoDB
AbstractMongoDB is one of the first commercial distributed databases that support causal consistency. Its implementation of causal consistency combines several research ideas for achieving scalability, fault tolerance, and security. Given its inherent ...
Comments