To MGR or Not MGR? Review of MySQL Group Replication

Image for post
Image for post

MySQL Group Replication GA

On December 12, 2016, Oracle released exciting news to the MySQL circle. It officially launched version 5.7.17 of MySQL, which includes the long-awaited MySQL Group Replication (MGR). This article provides insights on the basics of MGR and Galera and ponders the question of whether or not MongoDB will become the next Galera.

What is MGR?

MGR is a highly available solution officially launched by MySQL. It is based on the native replication technology and is available in the plug-in form. For those of you not in the know, below are some of the main features of MGR:

Image for post
Image for post

What is Galera? Will be Phased Out

Galera is a multi-master cluster based on synchronous replication. It is an easy-to-use solution that offers scalability and data security.

Image for post
Image for post

Comparison Between MGR and Galera

The following figure compares MGR and Galera:

Image for post
Image for post

Limitations of MGR

Although MySQL Group Replication provides high availability and a multi-master update everywhere in the replication solution, it still has few limitations.
●MGR only supports InnoDB tables, and each table must have a primary key for conflict detection of write sets.
●The global transaction identifier (GTID) feature must be enabled, and the binary log format must be set to ROW to select the master and write set.
●COMMIT may lead to a failure, which is similar to a snapshot failure scenario at the transaction isolation level.
●Currently, MGR supports a maximum of nine nodes.
●The foreign key and save point features are not supported and global constraint detection and partial rollback cannot be carried out.
●The binary log is not compatible with binlog event checksum.

Will MongoDB Become the Next Galera?

According to Oracle’s current development roadmap, a distributed document database cluster will be created in the future. InsideMySQL is hoping for the GA of InnoDB Cluster in the future. The development of MGR brings it one step closer. The more powerful MongoDB is a worthy rival for competition. In fact, it’s worth waiting for a distributed document database based on MySQL, the most popular and stable option on the internet, which supports transactions, row level locks, MultiVersion Concurrency Control (MVCC), and high data consistency.

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store