MySQL Fabric with MariaDB Galera Cluster ?

MySQL Fabric is a very promising sharding framework. If I take Ulf Wendel definition of MySQL Fabric :

MySQL Fabric is an administration tool to build large “farms” of MySQL servers. In its most basic form, a farm is a collection of MySQL Replication clusters. In its most advanced form, a farm is a collection of MySQL Replication clusters with sharding on top.

So MySQL Fabric takes care of two very orthogonal features :

  • High availability of servers
  • Sharding of data

Let us forget about sharding and look at the High availability infrastructure.

Servers are included in groups, called “High Availability Groups” when we talk about HA.
Each Server has an associated Status (or Role): primary secondary, spare
Each Server has also a mode : Offline, Read-only, and Read-Write.
The implementation has been made to allow various HA implementation patterns.
The most common HA pattern is the Master/Slave HA group ( in that case we should call it a “replica set” which is the terminology used in MongoDB or Facebook MySQL Pool Scanner (MPS).

Mats Kindahl in his blog post on MySQL Fabric High Availability Groups mentioned that other HA solutions are possible for an availability group :

  • Shared Storage with SAN or NAS
  • Replicated storage like DRBD
  • MySQL Cluster shared nothing cluster

In the case of a HA group based on MySQL Cluster the group is self-managing regarding HA and MySQL Fabric does not handles the failover. With the “Shared Storage” and “Replicated storage” availability groups the secondary servers will be offline.

So one of my ideas that I hope is feasible would be to use MariaDB Galera Cluster as another HA solution with MySQL Fabric. The main advantage of this solution relates to the characteristics of MariaDB Galera Cluster. MariaDB Galera Cluster is an Active-active multi-master topology with synchronous replication. MariaDB Galera Cluster being innoDB based does not carry all the usage limitations associated with MySQL Cluster (main one being limited join capabilities).

Regarding to MySQL fabric the behavior of an availability group based on MariaDB Galera Cluster is identical to MySQL Cluster. It is a self-managing availability group.

MariaDB Galera Cluster

MariaDB Galera Cluster
Getting Started with MariaDB Galera Cluster

MySQL Fabric

MySQL Fabric: A new kid in the MySQL sharding world  2013-10-09 Serge Frezefond
MySQL Fabric: High Availability Groups  2013-10-21 Mats Kindahl
A Brief Introduction to MySQL Fabric  2013-09-21 Mats Kindahl
MySQL Fabric – Sharding – Introduction  2013-09-21 VN (Narayanan Venkateswaran)
MySQL Fabric – Sharding – Simple Example  2013-09-22 VN (Narayanan Venkateswaran)
MySQL Fabric – Sharding – Shard Maintenance  2013-09-27 VN
MySQL Fabric – Sharding – Migrating From an Unsharded to a Sharded Setup  2013-09-22 VN
Installing MySQL Fabric on Windows  2013-10-03 Todd Farmer
MySQL 5.7 Fabric: any good?  2013-09-23 Ulf Wendel

Writing a Fault-tolerant Database Application using MySQL Fabric  2013-09-21 Alfranio Junior
Sharding PHP with MySQL Fabric  2013-10-09 Johannes Schlüter
MySQL Fabric support in Connector/Python  2013-09-22 Geert Vanderkelen
MySQL Connector/J with Fabric Support  2013-09-21 Jess Balint

1 comment to MySQL Fabric with MariaDB Galera Cluster ?

  • I have not been part of the Fabric design group neither did I involve myself. When I read Mats is at it, I relaxed… all I do at the moment is speaking out loud how I understand the Fabric teams decisions.

    Fabric has a very flexible design. It could be described as a Middleware approach. It is a medium sized collection of Python scripts to manage a farm of MySQL servers. Although it is a safe bet to expect MySQL features specifically made for Fabric, it not what one might call an in-core design. If it was in-core, we would talk massive server changes, C/C++ programming, super deep integration into MySQL servers and so forth. This is not the case. It does not take one of the – on a global level – very few MySQL core developers to extend Fabric. Nor does it take ages to implement tweaks as most tweaks can be done in the middleware. That mean, you don’t have to wait for the server to implement this or that.

    When I wrote the lines you cite, there was (and AFAIK still is) only one /built-in/ way to ensure availability of groups. It is the use of MySQL Replication. The Python code that exists focusses on MySQL Replication. Todays Fabric is limited to MySQL Replication. This is a soft limit as Mats hinted.

    Anybody who can write Python code and is willing to bite the bullet could lift the limit :-) . Of course, you could use a Galera Cluster for a group! It is just you would be the first to try and might have to do some hacking. You might want to think about how to handle the different states a group member can have (online, offline, spare, …). Your might have to write code for starting and stopping and so forth. Whatever.

    The key is in the use of a middleware approach and a scripting language. Fabric wants to be extensible. Whether this early version really is…. oh, oh… be gentle… I really don’t know.

Leave a Reply




two − 1 =

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">