The cost of MongoDB ACID transactions in theory and practiceБазы данных и системы хранения
Henrik Ingo – архитектор решений MongoDB, а сейчас ведущий инженер по производительности в Mongo DB. Специализируется на повышении производительности MongoDB и обеспечении высокой доступности, а иногда и на преобразовании XML-документов в JSON.
До MongoDB в течение многих лет работал в мире MySQL и LAMP с MySQL, MariaDB, Drizzle, Percona, WebScaleSQL, MySQL Cluster и Galera Cluster. Он также является контрибьютором в ядро Drupal 7.
Автор книги «Открытая жизнь: философия Open Source» (англ. "Open Life: The Philosophy of Open Source").
Henrik Ingo has worked 5 years at MongoDB. Initially as a Solutions Architect working with European customers, he's now in R&D on the performance team. Prior to MongoDB he was active - and an activist - in the MySQL space, and employed by MySQL (MySQL NDB Cluster team), MariaDB and Galera Cluster. Henrik is the author of the book "Open Life: The Philosophy of Open Source"
MongoDB 4.0 introduced support for full ACID transactions. This is the culmination of several durability, consistency, and isolation related features released in the past years. We will review all the available options for readConcern and writeConcerns. We explain their implementation in order to understand their latency cost to the client application, and then compare this theoretical cost with real measurements.
Durability levels:
- j: true/false (journaling to disk);
- w: 0, 1, majority, N (nr of replicas).
Consistency levels:
- sessions: causal consistency;
- readConcern: local, available, majority, linearizable, snapshot;
- readPreference: primary, secondary, etc...