Home MySQL Blogs MySQL Ndb & MySQL with Galera why we should not compare them.
MySQL Ndb & MySQL with Galera why we should not compare them. PDF Print E-mail
Written by Marco Tusa   


In the last few months, we have seen more and more discussion on the use of Galera solution for MySQL Clustering.

I have being one of those that had heavily test and implement Galera solution, actually with quite good results and I have also presented SOME of them at Oracle Connect.

On the other side I have be work with MySQL NDB for years (at least from 2007) at many customers site, from simple to complex setups.

So also if I cannot consider myself as mega expert, I think to have some good experience and insight on both platform.

The point here is that I was not happy in reading some articles comparing the two, not because the kind of tests, or results.

Not because I prefer this or that, but simply because, from my point of view, it does not make any sense to compare the two.

We can spend pages and pages in discussing the point here, but I want try to give a simple generalize idea of WHY it makes no sense in few lines.

NDB brief list

  • NDB is not a simple storage engine and can work independently, MySQL is “just “ a client.
  • NDB is mainly an in memory database and also if it support table on disk the cost of them not always make sense.
  • NDB is fully synchronous, no action can be returned to client until transactions on all nodes are really accepted.
  • NDB use horizontal partition to equally distribute data cross node, but none of them has the whole dataset (unless you use one node group only, which happens ONLY when you don’t know how to use it).
  • NDB Replicate data for a specific factor, which is the number of replica, and that replication factor will not change with the increase of the nodes number.
  • Clients retrieve data from NDB as whole, but internally data is retrieve by node, often use parallel execution. (Not going in the details here on the difference between select methods like match by key, range, IN option and so on).
  • NDB scale by node group that means it really scale in the Dataset dimension it can manage and operation it could execute, and it really scale!

Galera brief list

  • Galera is an additional layer working inside the MySQL context.
  • Galera require InnoDB to work.
  • Galera offer “virtually synchronous” replication.
  • Galera replicate the full dataset across ALL nodes.
  • Galera data replication overhead, increase with the number of nodes present in the cluster.
  • Galera replicate data from one node to cluster on the commit, but apply them on each node by a FIFO queue (multi thread).
  • Galera do not offers any parallelism between the nodes when retrieving the data; clients rely on the single node they access.

So why they cannot be compare?

It should be quite clear that the two, are very different from starting from the main conceptualization, given NDB is a cluster of many node groups with distribute dataset, while Galera is a very efficient (highly efficient) replication layer.

But just to avoid confusion:

  1. NDB does data partition and data distribution with redundant factor.
  2. Galera just replicate data all over.
  3. NDB apply parallel execution to the incoming request, involving more node groups in data fetch.
  4. Galera is not involved at all in the data fetch and clients need to connect to one node or more by themselves, means application require managing parallel request in case of need.
  5. In NDB the more node groups you add the more you get in possible operation per second and data archived/retrieved. 
  6. In Galera the more nodes you add, the more overhead you generate in the replication, so more data will require to be “locally” commit by the replication layer, until when the number of nodes and operations executed on them will compromise the performance for each node.


NDB Cluster is a real cluster solution, design to internally scale and to perform internally all the required operation to guarantee high availability and synchronous data distribution.

Galera is a very efficient solution to bypass the current inefficient mechanism MySQL has for the replication.

Galera allow to create a cluster of MySQL nodes, in virtually synchronous replication. This with almost zero complexity added on the standard MySQL management.

Never the less the obtaining platform is composed by separate nodes, which for the good or the bad is not a system of distributed data.


Given that, the scenario where we can use Galera or NDB are dramatically different, trying to compare them is like comparing a surfboard with a snowboard.

I love them both, and honestly I am expecting to see Galera deployment to dramatically increase in 2013, but I am still respecting my motto “use the right tool for the job”.


Let us try to make our life easier and avoid confusions.

Happy MySQL to all!!




Comments (11)
  • Ivan Zoratti  - I am not sure I totally agree
    Hi Marco,

    I am not sure I totally agree with your conclusions. In order to use "the right tool" you need to understand what the tools do, which implies that you need to compare them.

    If you collect clear requirements, then you can say how Galera and NDB fit in a given scenario, which is a comparison per se.

    Just my humble opinion...
  • Marco Tusa
    Ivan, thanks for the comment,
    It will sounds probably schizophrenic, but I agree with you.

    We must test and understand the different platforms, this is why we must perform test on them.
    We need to identify what are the best characteristic of each to use them in the right way.
    This is why I spend a lot of time in doing test and evaluation, and why we set up POC with the customers evaluating behaviours in real environment.

    Never the less what I am saying in the article is still valid, because I am referring no to the comparison on the feature/behaviour, but on some performance mixing pears and apple.

    Confusing Galera solution with NDB is a rookie mistake, for the reasons already mention.

  • Redondo Beach Marketing  - tusacentral.net working for a better world... befo
    I enjoyed reading this. love jesse grillo and redondo beach. Makes specialized web campaigns, adwords advertising campaigns online business.
  • Aide Saldibar  - tusacentral.net working for a better world... befo
    Inteligente a sua desenvolvimento do tema foi nítido espro que leia postagens que escrevi em meu Blog
  • Rosella Dayrit  - tusacentral.net working for a better world... befo
    Hi there, just wanted to let you know that we had a great holiday at Marina de Bolnuevo in June of this year. The beaches are sublime, most of them awarded the Blue Flag. The bars were great, with paella on the beach a highlight and managed a day on the nudist beach there. Very liberating. This website doesn't look quite finished yet but hopefully will be soon.
  • Tanner Pora  - tusacentral.net working for a better world... befo
    Where will be the ft .? An errant toe for the standard although keeping the ball will result in an "out of bounds" phone. When you vacation without having dribbling, you're going to get on your own in a turn over situation. Also, when you're moving your feet when a display has been set up, it is possible to take a fee or pick to try and have a nasty.
  • Alvaro Stuber  - tusacentral.net working for a better world... befo
    Very energetic article, I loved that bit. Will there be a part 2?|
  • Margarito Argyle  - tusacentral.net working for a better world... befo
    This info is invaluable. Where can I find out more?|
  • Waylon Sieverson  - tusacentral.net working for a better world... befo
    Hello. Just wanted to share with you the best of Europes festivals over the past few months. We have visited most of these in the past year and I can assure you that they are brilliant. Find time to relish in life and attend one of these this year. Looking forward to some more interesting posts on the Marina de Bolnuevo blog (www.marinedebolnuevo.co.uk). Have a great day.
  • קוקסינליות בתל אביב  - tusacentral.net working for a better world... befo
    I discovered your blog site on google and appearance a couple of your early posts. Maintain the great operate. I recently additional your Feed to my MSN News Reader. Seeking forward to reading a lot more within you down the line!…
  • קוקסינליות בתל אביב  - tusacentral.net working for a better world... befo
    You have brought up a very superb details, thanks for the post.
Write comment
Your Contact Details:
[b] [i] [u] [url] [quote] [code] [img]   
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

Last Updated on Sunday, 18 August 2013 17:24

Connecting from

Your IP:


Who's Online

We have 50 guests online