MongoDB and Raft Базы данных и системы хранения
Henrik Ingo – архитектор решений MongoDB, проживающий недалеко от Хельсинки (Финляндия). Специализируется на повышении производительности 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 4½ 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 3.2 introduced a new replication protocol: version 1, or pv1 for short. While still similar to the original replication protocol (pv0), it adds some robustness improvements found in the Raft algorithm. Raft is an algorithm introduced in a series of academic publications by Diego Ongaro. It's a short and simple leader-based replication algorithm, popular in particular due to its design goal of being remarkably simpler than Paxos and other predecessors.
I'll present the Raft algorithm, as well as some typical robustness fixes an implementation might want to add to Raft. We can observe that on a high level, Raft is very similar to MongoDB's replication, which precedes Raft. There are also differences, in particular MongoDB is a pull based replication system, while Raft is push based. I then cover some key ideas from Raft that were implemented in MongoDB 3.2, to fix major robustness shortcomings in protocol version 0 and allow to shorten the failover time for applications where uptime is critical.