MySQL Fabric is awesome

I'm fascinated about MySQL Fabric. After hours of study and test, I would say it is the best framework, hands down. Over the years, there are loads of MySQL HA products, like MHA and MMM. There is a host of sharding solutions as well, such as Twitter's Gizzard and Google's Vitess. What makes MySQL Fabric really special is that it combines the idea HA and sharding, which mean it is more than a single solution. It is an fascinating and super user-friendly framework. However, bear in mind that MySQL Fabric only support MySQL version 5.6.10 and later due to the fact that it uses GTID to manage replication and other related operation. First, let's see how Oracle defines MySQL fabric:

MySQL Fabric is a system for managing a farm of MySQL servers. Fabric provides an extensible and easy to use system for managing a MySQL deployment for sharding and high-availability.

It is written by python scripts which is very friendly to developers. Besides, MySQL Fabric is released under GPL license. That is to say, it is totally open source. On top of that, MySQL Fabric is developed and maintained by Oracle. If you are stuck with any trouble, you can turn to Oracle for help.

The following picture shows the architecture of MySQL Fabric:

MySQL Fabric is awesome-MySQL社区 Inside MySQL Group

As you can see, MySQL Fabric is consisted of several part:

  • Fabric Aware Connector: The connector contacts the Fabric server to find the location of a particular shard key. The connector also implements caching to avoid repeated round trips to the Fabric server to fetch the sharding information.
  • Fabric Server: default port is 33274. When starting up, it reads data from backing store.
    • Stores the sharding information
    • Maintains the sharding, like split and move
  • backing store: A MySQL database, storing meta data like servers, groups, HA, sharding, etc.
  • Global Group: If you want to use MySQL Fabric to sharding, you must create a global group. It stores all updates that must be propagated to all shards that are part of a sharding scheme. Besides, it also stores the global tables in this sharding definition.
  • Group: MySQL servers is maintained according to group. You can use MySQL Fabric to create group, add MySQL servers to group, establish replication, etc. In each group, only Primary node is read write, Secondary is always read only. If primary node crashed, user can use MySQL Fabric to failover automatically.

Developers must use Fabric-aware connectors to fully take advantage of its features to work with a set of servers managed by MySQL Fabric. Currently, it only support python and Java. MySQL fabric and Fabric-aware connectors are in MySQL utilities. You can download it from MySQL website(http://dev.mysql.com/downloads/utilities/).

MySQL Fabric is super user-friendly, which means you can create a MySQL cluster in less than 10 minutes. I've made two video about how to use MySQL Fabric to manage HA and shard. It is really easy. Be sure to check it out by yourselves.

MySQL Fabric HA

[youku id="XNzIzODQyNTA4"]

MySQL Fabric Sharding

[youku id="XNzIzODQ0Njg4"]

The only thing I'm concerned about is the XML-RPC protocol used by Fabric Server. I've heard that its speed is not fast. So I will continue studying this issue and show some results based on benchmarks.

发表评论

1 条评论
  • 沙发 james 

    How to avoid Fabric to be a single point of failure please?

相关文章
WTF?MySQL DBA技术难度低为什么工资比Oracle高?
WTF?MySQL DBA技术难度低为什么工资比O…
MySQL 5.7新特性之在线收缩undo表空间
MySQL 5.7新特性之在线收缩undo表空间
这一刻,MySQL 8终于追赶上了Oracle 8 · 降序索引
这一刻,MySQL 8终于追赶上了Oracle 8 ·…
原谅我这么幼稚,所以才会喜欢你这麼久 #MySQL#
原谅我这么幼稚,所以才会喜欢你这麼久 …
为什么我再不看好MariaDB
为什么我再不看好MariaDB
MariaDB插上大数据的翅膀?——可能只是一厢情愿
MariaDB插上大数据的翅膀?——可能只是一…
Oracle MySQL ACE. Author of Inside MySQL and MySQL Core Series. Great at MySQL performance tuning、troubleshooting、systems availability and scalability、capacity planning, etc.

一触即发,2017年,数据库世界的诸神之战