Product

How it works Features Performance Screenshots Docs Security Questions

Start here

Getting started Download The manual Frequently asked questions

More

Security Performance Source
Free and open source MySQL or MariaDB MIT licensed Ubuntu 22.04 and newer

Three machines, one database.

MySQL Cluster builds a Galera cluster from bare machines and then runs it from one web page. You pick MySQL or MariaDB, and the rest is the same either way. Every node takes writes. No write is confirmed until all of them have agreed to it. Lose a machine and nothing pauses, nothing fails over, and nobody gets woken up.

$0per node, per year, forever
3machines is the whole shopping list
21,556operations a second, measured
0seconds of failover, because there is none
The MySQL Cluster dashboard showing three synced nodes
Three nodes, all taking writes. This is the whole of a healthy cluster.

The problem this solves

Galera is excellent and it does not come with a way to run it.

Building it is a day of work

Compiling MariaDB with Galera, or getting Percona onto a release they publish for, then sizing the buffer pool for the machine, writing a config that is identical on every node, and doing all of it three times without one of them drifting.

Nothing shows you the cluster

Galera publishes forty status variables per node and no page that puts them together. Whether a node is falling behind is a number you have to know to look for.

The failures are quiet

A node serving its own cluster of one looks perfectly healthy. A node out of quorum answers every connection and refuses every write. Neither announces itself.

Two commands to a running node

Then the same two on the next machine, and a ticket from the web page to join it.

sudo git clone https://git.failoverlb.net/mysqlcluster.git \
    /data/docker/mysqlcluster
cd /data/docker/mysqlcluster && sudo ./install.sh

That installs the agent, builds the manager and starts it. The database is one more command, or a button, and that is where you pick MySQL or MariaDB. Everything before that command and everything after it is the same either way.

What it does

Sixteen things, grouped by when you need them.

Running the cluster

Seeing what is happening

The data

Getting in, and getting there

Numbers from a real cluster

Three machines, 4 processors, 16 GB of memory and NVMe disks, driven from all three nodes at once. Both servers, on the same machines, wiped and rebuilt in between.

21,556 operations a second at 96 connections
56,079 reads a second, which do not cross the cluster
65% more on MariaDB than MySQL, settings matched
30% less throughput with a node 2,000 miles away

The limit is the write path rather than the hardware: at peak the processors were 61% busy with 11.6 of 15.5 GB of memory free. Every write has to be accepted by every node before it commits, so writes do not scale by adding machines. Reads do.

What it will not do

Better said here than found out later.

It will not make your database faster

A cluster writes no faster than one machine and usually a little slower, because every node does every write. What it buys is that losing a machine costs nothing.

It is not a backup

Three identical copies protect against a machine dying and nothing else. A dropped table reaches every node in milliseconds. It takes backups too, and they are the copy that a mistake does not reach.

Two machines will not survive a failure

That is arithmetic rather than a limitation: either failure leaves one node holding half, and half is not a majority. Three is the smallest useful cluster.

One cluster, one server

There are two installers, MariaDB and Percona XtraDB Cluster, and a cluster has to be all of one or all of the other. A join of the wrong one is refused rather than allowed to become a cluster that disagrees with itself about what SQL means.

Three machines and an afternoon

Free, MIT licensed, and yours to keep. There is no paid tier and nothing to sign up to.