I'm new to the MySQL world and was confused by the two. Don't they both provide high availability and sharding?

Also, how does WebScaleSQL compare?

up vote 19 down vote accepted

These 3 things have nothing to do one with each other. I will give you an introduction and you can search or ask for more specifics separately:

MySQL Cluster is the marketing name of what many of us call - to avoid confusions like the one you are currently suffering from - "NDB Cluster" or "MySQL NDB Cluster". It is a synchronous mostly memory-only key-value store that allows a shared-nothing architecture for MySQL (providing a backend to the NDB Engine). It provides automatic sharding (so, better read and write throughput) and high availability. It works well for high-throughput key-value small-data systems, but it is relatively complex to setup (leading to problems if it is not configured correctly, or it is used in unintended ways) and it is not the best thing latency-wise (raw speed). This is simplified version (it can be used for more thing than memory-only and key-value, but it was designed around it). In my opinion, a very good piece of engineering, but it has limited use cases, as it is a different product than regular MySQL server with separate downloads (and requires the usage of a specific engine).

MySQL Fabric is a set of tools/middleware written in python that allows the managing of a set of regular MySQL servers in a replicated GTID environment. It is not a cluster per se, but it facilitates the managing of one. It has links to (for now) Java and Python connectors, so it can handle automatically the sharding and high availability of servers, but it is a layer on top of regular MySQL servers and regular replication (regular storage engines like InnoDB can be used). Replication, up to now is asynchronous (or semi-synchronous), so it may not provide by itself the best consistency and security; this may change in future 5.7 versions. However, this approach has less overhead on latency and uses MySQL DBA's more familiar replication technology. MySQL Fabric is a relatively new kid in the neighbourhood, so not yet very extended, but it seem to be Oracle's reaction (together with announced synchronous replication) to competitor's Galera-based clusters.

If you needed sharding and HA, you may use one of the 2 former products, but probably for totally different scenarios.

WebScaleSQL is not an HA solution, like the previous ones, it is just the name that several companies gave to a fork/version of MySQL where they share specific patches that they need and maybe Oracle has not applied. As far as I know it has been created by Facebook, Twitter, LinkedIn and Google, and they rebase their own MySQL versions on top of that common base. They do not provide support or binary releases. If you are an end user, you probably should not care to use it, but you should keep an eye on the project to see what will evolve from it, or the response from other vendors.

If you are trying to learn/start with MySQL HA/scaling, start with basic MySQL replication (it may not be the best, but it is the easiest thing to start with), then you can continue from there to other solutions: DRBD[sic], GTID-replication, NDB, Galera, Tungsten.

  • Why do you put the "[sic]" after DRBD name? I've looked at them and they seem to be fairly impressive from a technological point of view. – Vérace Mar 26 '16 at 22:13
  • DRBD is a block-level technology, which means it knows nothing about the DB or its buffers. Don't expect a great performance for OLTP systems; it can't be active-active (not even as in read-only mode), if MySQL crashes, you have to recover as it had crashed locally, and it doesn't protect you from database corruption. It is not a pure "shared nothing" technology at logical level- it is more of a distributed RAID so it is not a 100% fit for MySQL. It is nice for low-write load or if you need to distribute several protocols at the same time. Row-based semi-sync replication is superior otherwise. – jynus Mar 28 '16 at 11:11
  • @Vérace ... It is, in summary, a use case objection (MySQL clustering), I have nothing against the technology in other cases, where higher level protocols may not be available/it could be a better fit. – jynus Mar 28 '16 at 11:15
  • I understood perfectly - the point about buffering is well made - DRBD, as you say, knows nothing about the internals of MySQL - i.e. stuff committed but not yet written to disk will be lost in the event of a crash. – Vérace Mar 28 '16 at 11:20

MySQL Fabric is implemented as a MySQL Fabric node/process (which performs management functions) and Fabric-aware connectors that are able to route queries and transactions directly to the most appropriate MySQL Server. The MySQL Fabric node stores state and routing information in its State Store (which is a MySQL database).

MySQL Cluster is a technology that enables clustering of in-memory databases in a shared-nothing system. The shared-nothing architecture enables the system to work with very inexpensive hardware, and with a minimum of specific requirements for hardware or software.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.