skip to main content
research-article

Tunable consistency in MongoDB

Published:01 August 2019Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. BSON Specification. http://bsonspec.org/. Accessed: 2019-02-04.Google ScholarGoogle Scholar
  4. Examples of read consistency levels. https://docs.datastax.eom/en/cassandra/3.0/cassandra/dml/dmlClientRequestsReadExp.html. Accessed: 2019-02-12.Google ScholarGoogle Scholar
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. Group Replication Background. https://dev.mysql.com/doc/refman/8.0/en/group-replication-background.html. Accessed: 2019-02-12.Google ScholarGoogle Scholar
  7. Group Replication - Consistent Reads. https://mysqlhighavailability.com/group-replication-consistent-reads/. Accessed: 2019-02-12.Google ScholarGoogle Scholar
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. How is the consistency level configured? https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlConfigConsistency.html. Accessed: 2019-02-12.Google ScholarGoogle Scholar
  10. 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 ScholarGoogle Scholar
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. Postgres Failover. https://www.postgresql.org/docs/9.1/warm-standby-failover.html. Accessed: 2019-02-12.Google ScholarGoogle Scholar
  13. Postgres Synchronous Replication. https://www.postgresql.org/docs/9.1/warm-standby.html#SYNCHRONOUS-REPLICATION. Accessed: 2019-02-12.Google ScholarGoogle Scholar
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle Scholar

Index Terms

  1. Tunable consistency in MongoDB
      Index terms have been assigned to the content through auto-classification.

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image Proceedings of the VLDB Endowment
        Proceedings of the VLDB Endowment  Volume 12, Issue 12
        August 2019
        547 pages

        Publisher

        VLDB Endowment

        Publication History

        • Published: 1 August 2019
        Published in pvldb Volume 12, Issue 12

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader