views:

893

answers:

2

Before few days I was at some IT conference here in Belgrade. On Agenda was a topic about MySql, and clustering in MySql, and the guys from MySql said that they have the best solution for cluster split brain problem, does anyone know something about this, is this true or just a marketing trick?

+2  A: 

MySQL Cluster requires at least 3 systems which allows it have one of the nodes be an arbitrator for dealing with split brain scenarios. Two of the systems can run data nodes/mysqld nodes and the third needs to run the management node (which is normally the arbitrator by default, however SQL nodes can also operate as them).

In the event of a split brain setup (ie. the two data nodes can no longer talk to each other, but they are still running), then they will realize it and ask the arbitrator to decide which node is allowed to continue to running. If a node can not talk to the arbitrator then it will shutdown. From all of the nodes the arbitrator can talk to it will pick a node to continue to running and tell the other(s) to shutdown.

The arbitrator is normally the management node, but can also be data nodes. If the arbitrator fails, then the cluster can elect a new one. However, it can't do this during arbitration, so if both a data node and arbitrator fail at once, the third node will shutdown.

Of course, it gets a bit more complex when you have multiple node groups, but the same basic ideas apply in those cases as well.

You can read more about this at in the MySQL Cluster FAQ.

Harrison Fisk
I know all of this, you doesn't answer on basic is this true or not?
vaske
"Best" is subjective, but it seems quite good to me. Arbitration is the most commonly accepted solution regarding this (often done via disk shared-disk). The fact it can elect new arbitrators means it is flexible as well. Have you seen any other better ways of dealing with split brain scenarios?
Harrison Fisk
A: 

It is subjective whether or not this is true or not, although I've heard that mysql's cluster support is good. However this concept is definitely supported and in use for other db's such as Slony-I for postgres.

You may get more useful responses if you clarify what aspect of best you mean (i.e. performance, up-time, ease of setup, etc).

Dana the Sane