Cluster

How does Galera Cluster behave with many nodes?

Recently I had the opportunity to have a lot of Linux systems (VMs with Rocky Linux 9) from one of our regular Galera Cluster trainings all to myself for a week. And MariaDB 11.4.4 with Galera Cluster was already installed on the machines.

Since I had long wanted to try out how a Galera Cluster behaves with an increasing number of nodes, now was the opportunity to try it out.

The following questions were to be answered:

  • How does the throughput of a Galera cluster behave depending on the number of Galera …

MariaDB Galera Cluster Upgrade Path

Because we conduct many customers in MariaDB Galera Cluster upgrades and because these customers sometimes have pretty old MariaDB Galera Cluster set-ups I think it is good to have a rough MariaDB Galera Cluster Upgrade Path.

For an Upgrade Path we have to consider a few things:

  • We face different MariaDB Galera Cluster version (5.5, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5 and soon 10.6).
  • We face different Galera plug-in versions (v2, v3 and v4). Direct upgrade from v2 to v4 is not possible. Upgrade from latest …

Upgrading from MariaDB 10.4 to MariaDB 10.5 Galera Cluster

Because upgrading from MariaDB 10.4 to MariaDB 10.5 (non-clustered) seems not to be a problem
[ 1
] we take the challenge and try to create a receipt based on the MariaDB 10.3 to MariaDB 10.4 Galera Cluster upgrade documentation
[ 3
]:

Before you start

Before you begin with the upgrade you should consider a few things:

  • Downgrade is officially not supported!
    [ 4
    ] It might work, or not.
  • So you should have taken a proper an clean backup before you start with the upgrade and you should be sure the restore …

Limitations of Galera Cluster

If and how to use Galera Cluster for MySQL has been described already by many others…

In this article we focus on the question: When is Galera Cluster NOT the right solution for you?

These thoughts also apply to Percona XtraDB Cluster (PXC) and MariaDB Galera Cluster.

  • Galera Cluster currently supports only InnoDB (and TokuDB?) tables properly. You should avoid to use MyISAM or MEMORY tables. Otherwise data consistency is not guaranteed.
  • It is wise to use Galera Cluster only if your software vendor …

Logging Galera Cluster conflicts

We typically suggest our customers to use our MySQL/Galera Cluster my.cnf configuration template to avoid MySQL configuration and performance problems.

And we are paranoid as well. Thus we enable all useful logging:

wsrep_log_conflicts = 1

But this has also some consequences of more visibility…

If you monitor carefully your Galera Cluster for example with the FromDual Performance Monitor for MySQL and MariaDB, you might probably see some strange values increasing from time to time:

mysql< SHOW …

Replication channel failover with Galera Cluster for MySQL

Sometimes it could be desirable to replicate from a Galera Cluster to a single MySQL slave or to an other Galera Cluster. Reasons for this measure could be:

  • An unstable network between two Galera Cluster locations.
  • A separation of a reporting slave and the Galera Cluster so that heavy reports on the slave do not affect the Galera Cluster performance.
  • Mixing different sources in a slave or a Galera Cluster (fan-in replication).

This article is based on earlier research work (see MySQL Cluster - Cluster …

Why FromDual customers are using Galera Cluster for MySQL

We are very satisfied with the functionality and the launch. The entire Cluster is running absolutely stable. This is a significant advantage for our customers because we are able to offer our services without interruption. We will use Galera in further projects and convert our existing Master/Slave installations.

A. Rempening, Datenbank-Administrator, KiKxxl GmbH

Download this case study: KiKxxl Gmbh: Highly available communication services based on a MySQL database and Galera Cluster (PDF, 420 kbyte).

FromDual Ops Center for MariaDB and MySQL (focmm)

The FromDual Ops Center for MariaDB and MySQL (focmm) is a browser-based Graphical User Interface (GUI) to operate and manage your MariaDB and MySQL database farms (2 - 99 instances) more easily.
If further provides tools to implement your own Database as a Service (DBaaS) infrastructure.



FromDual Ops Center covers the full life-cycle of a database:

  • Installation of your database from different Repositories.
  • Configuration of your database instance.
  • Track configuration changes of your database instance. …

Galera Cluster for MySQL

Features

Galera is a synchronous multi-master replication Cluster for MySQL/InnoDB databases, having features like:

  • Synchronous replication
  • Active-active multi-master topology
  • Read and write to any cluster node
  • Automatic membership control, failed nodes drop from the cluster
  • Automatic node joining
  • True parallel replication, on row level
  • Direct client connections, native MySQL look & feel

Benefits

The benefits of these features are:

  • No slave lag
  • No lost transactions
  • Read scalability and write …

Unbreakable MySQL Cluster with Galera and Linux Virtual Server (LVS)

Recently we had to set-up a 3-node Galera Cluster with a Load Balancer in front of it. Because Galera Cluster nodes (mysqld) still reply to TCP requests on port 3306 when they are expelled from the Cluster it is not sufficient to just leave it to the Load Balancer to check the port if a Galera node is properly running or not.

We used the wsrep_notify_cmd variable to hook our own script into the Galera Cluster which disables each Node on the Load Balancer when its state changed.

# my.cnf
#
[mysqld] …

Bootstrapping Galera Cluster the new way

A while ago it was pretty inconvenient to start a complete Galera Cluster from scratch. Rolling restart an such things are already working well but bootstrapping was a pain.

With Galera v2.2 new functionality came in. We tried it out and it did not work as documented. :-( Thanks to Teemu’s help we found there was a documentation bug in the Galera documentation.

The settings which were working for us are:

wsrep_cluster_address = "gcomm://192.168.1.2,192.168.1.3?pc.wait_prim=no"

And when all …

tags: 

Artikel über MySQL im neuen iX

Hallo MySQL Gemeinde,

Im neuen iX (2012-10) hat es zwei nette Artikel über: MySQL HA-Lösungen (S. 116) und MySQL 5.6 (S. 66).

Viel Spass beim Lesen!

Galera Cluster Nagios Plugin

Based on customer feedback we have decided to add a plugin Galera Cluster for MySQL to our MySQL Nagios/Icinga Plugins.

The module checks, if the node is in status Primary and if the expected amount of Galera Cluster nodes is available. If not, a warning or an alarm is returned.

The script is written in Perl and is Nagios Plugin API v3.0 compatible.

You can download it from our download page.

If you have suggestions for improvements, please contact us. Bugs can be reported at our bugs database.

The …

Galera Cluster discussions at FrOSCon 2012

During and after Henriks great talk about Galera Cluster at the FrOSCon 2012 in St. Augustin we found 2 important things related to Galera Cluster for MySQL:

  • The InnoDB double write buffer (innodb_doublewrite) should not be disabled anymore for Galera when using v2.0 and higher!!! The reason for this is: When MySQL crashes InnoDB pages might get corrupted during the crash. They would be fixed by the blocks from the double write buffer during auto-recovery. But if the double write buffer is disabled they …

Codership partners with FromDual to offer consulting and support services for Galera Cluster for MySQL

Helsinki, Finland, Uster, Switzerland – February 18, 2012 – Codership, the provider of Galera Cluster for MySQL, and FromDual, a MySQL consulting company, today announced collaboration to offer Galera Cluster technology and related support and consulting services for Galera users all over the world, especially in German speaking countries Germany, Austria and Switzerland (DACH). Galera Cluster is a synchronous, true multi-master replication cluster for MySQL using the well known InnoDB storage engine. …

Building Galera Replication from Scratch

Introduction

MySQL/Galera synchronous Multi-Master Replication consists of 2 parts:

If you do not want to download the prepared binaries you can build it on you own.
First you have to download the native MySQL sources, then patch it with the Galera wsrep patches and compile it. In a second step you have to build the Galera Plugin.

This is especially useful because in the standard Galera binary tar balls the garbd …

Galera - Synchronous Multi-Master Replication Cluster for MySQL/InnoDB

Galera features

Galera provides the following features:

  • Synchronous replication
  • Active/active multi-master topology
  • Read and write to any cluster node
  • Automatic membership control, failed nodes drop from the cluster
  • Automatic node joining
  • True parallel row level replication
  • Direct client connections
  • Drop-in replacement for native MySQL

Galera benefits

Benefits using Galera Replication:

  • High Availability
  • No slave lag
  • No lost transactions
  • No more data inconsistency
  • Smaller client latencies
  • Read scalability …

MySQL HA (high availability) Cluster cookbook

In the following article I have summarized some steps and hints to set-up a MySQL active/passive failover Cluster also sometimes called MySQL HA.

With such a set-up you can achieve a 99.99% (4x9) HA set-up for MySQL (52 minutes downtime per year). The same procedure also works for PostgreSQL, Oracle and other database systems running on Linux (DRBD runs on Linux only).

The concept

The concept of an active/passive failover Cluster is the following:

  • You have 2 servers (also called nodes).
  • They communicate …

MariaDB, Galera and MySQL Support

FromDual is a support partner of MariaDB plc, Codership Oy and Oracle Corporation. This gives us the opportunity to offer you customized enterprise support subscriptions for your mission-critical MariaDB, Galera or MySQL databases for all three vendors.

Alternatively, we can offer you our remote DBA services (without SLA) or our MariaDB, Galera and MySQL trainings.

MariaDB and MariaDB Cluster Support Subscriptions

  • MariaDB Enterprise support subscription: 7x24 support subscription, duration: 1 to 3 years, …

Active/active failover cluster with MySQL Replication

Electing a slave as new master and aligning the other slaves to the new master

In a simple MySQL Replication set-up you have high-availability (HA) on the read side (r). But for the master which covers all the writes (w) and the time critical read (rt) there is no HA implemented. For some situations this can be OK. For example if you have rarely writes or if you can wait until a new Master is set up.

But in other cases you need a fast failover to a new master.

In the following article it is shown how to …

MySQL Cluster restore

Recently the question came up if it is faster to restore a MySQL cluster when all nodes are up or only ONE node from each node group during restore.

The answer from our gurus was: All nodes up during restore! I wanted to find out why. So I set up the following cluster and started to measure:

MySQL Cluster set up

Cluster set-up

MySQL Cluster backup

The backup is not that interesting. But I made the drawing for possible future use :-) :

Backup

MySQL Cluster restore

For the restore there are 4 different ways thinkable:

  • Restore …

MySQL Active - Active Clustering

It is possible to use an active - active shared-disk cluster in MySQL in some cases. For doing this you have to fulfill the following requirements:

  • Works with MyISAM tables only.
  • POSIX-locking compliant cluster file system on the device (such as OCFS2 or GFS).
  • External locking must be enabled.
  • The MySQL query cache must be turned off.
  • The MySQL delay key write must be turned off.
  • OS where file locking is supported in MySQL.

External Locking

Interested? To read more, follow the link: MySQL active - active Cluster (PDF 157 …

Subscribe to RSS - Cluster