Codership Tutorials on Galera Cluster

These are tutorial articles of the training section of the Codership Library. Here you’ll find tutorial articles on how to get started with Galera and other basic tasks related to initially starting a Galera Cluster. There are also some intermediate articles on a few other aspects of Galera and related software.

Getting Started with Galera Cluster

Length: 840 words; Writer: Staff; Pub: Oct 2014

This article explains Galera Cluster, how it works. It provides an overview for installing Galera Cluster and initializing nodes in a cluster. It’s a jumping off point to several other tutorial articles here.

Installing Galera Cluster

Length: 946 words; Writer: Staff; Pub: Oct 2014

This tutorial provides instruction to prepare your servers and installing Galera Cluster on each. When you install Galera Cluster, you must choose between three implementations available.

System Configuration

Length: 964 words; Writer: Staff; Pub: Oct 2014

After installing Galera Cluster on your servers, you’ll need to configure the database itself to serve as a node in a cluster. This straightforward article provides you a list of parameters to set in each node’s database configuration file, as well as setting swap space.

Replication Configuration

Length: 964 words; Writer: Staff; Pub: Oct 2014

With the system-level configurations complete, this article provides a guide to configuring the database server to connect and communicate with the cluster and explains the syntax format used in cluster addresses.

Starting the Cluster

Length: 1,097 words; Writer: Staff; Pub: Oct 2014

A cluster requires at least two nodes, but you have to start the first node somehow. To do this, you’ll need to bootstrap the Primary Component. This article explains how to initialize the cluster.

Testing a Cluster

Length: 499 words; Writer: Staff; Pub: Oct 2014

Once you have a cluster running, you should test some of the features to ensure it’s working properly. This will also help you understand how a cluster works so you can decide on your deployment. This tutorial provides a rough guide to testing replication and similar cluster operations.

Restarting the Cluster

Length: 791 words; Writer: Staff; Pub: Oct 2014

You may need occasionally to restart a cluster, perhaps becauser of a major power failure. Whatever the reason, restarting a cluster so that data saved only on one node isn’t overwritten by another node which just happened to have rejoined the cluster first can be tricky. This article explains how to determine the most up-to’-date node and then to restart the Primary Component on that one.

Monitoring a Galera Cluster

Length: 2535 words; Writer: Russell J.T. Dyer; Pub: Jul 2019

This tutorial explains how to monitor a Galera Cluster, utilizing the Galera specific status variables, as well as employing scripts for logging status information.

Debugging Problems with SST

Length: 985 words; Writer: Philip Stoev; Pub: Jul 2015

When new nodes join a cluster, Galera will transfer internally the entire dataset to the joiner. The same procedure, called State Snapshot Transfer (SST), applies to nodes that are rejoining the cluster after being down for a long period of time. This article offers some insights and troubleshooting advice for when there are problems with SST.

The Primary Component in Galera Cluster

Length: 782 words; Writer: Philip Stoev; Pub: Aug 2015

This article describes the Primary Component. This is a central concept in how Galera ensures database consistency and no divergence between nodes in case of a network split.

Support for Transaction Isolation Levels

Length: 1009 words; Writer: Seppo Jaakola; Pub: Sep 2015

Many DBAs and database developers don’t understand what MySQL transaction isolation levels Galera CLuster supports and how it does so. This articles tries to answer those uncertainties.

The Safe-To-Bootstrap Feature

Length: 745 words; Writer: Philip Stoev; Pub: Nov 2016

It’s usually not necessary to shut down an entire cluster for normal operation. However, sometimes it’s necessary. Often times it’s in the midst of a stressful situaiton. So it’s important to shut down a cluster safely and as quickly as possible to avoid extended downtime and potential data loss. This article addresses this situation, in particular “Safe-to-Bootstrap” protection.

To SST or Not To SST?

Length: 1001 words; Writer: Philip Stoev; Pub: Dec 2016

If a node leaves the cluster and subsequently rejoins, Galera will use one of two primary methods of getting the node rejoined and synchronized quickly with the rest of the cluster. This article describes the entire process of doing this and confusing messages one might see in the logs.

Read-After-Write Semantics with Galera

Length: 599 words; Writer: Philip Stoev; Pub: Jun 2015

Some applications attempt to read immediately a value just inserted into the database, without making those operations part of a single transaction. A read/write splitting proxy or a connection pool combined with a load-balancer can direct each operation to a different database node.

Geo-Distributed Database Clusters

Length: 1043 words; Writer: Philip Stoev; Pub: Oct 2014

With Galera, nodes may be located in a different physical or even geographical location. This article presents some of the benefits from having a geo-distributed cluster and the specific Galera features that enable practical replication across a WAN.

Debugging Transaction Conflicts

Length: 1,086 words; Writer: Philip Stoev; Pub: Jun 2015

When using Galera Cluster in multi-master mode, transaction conflicts may occur if two clients attempt to modify the same row at the same time. Such conflicts are reported a deadlock errors to the application. This article explains how to use the logs to troubleshoot such a problem.

Installing a Galera Cluster on AWS

Length: 2494 words; Writer: Russell J.T. Dyer; Pub: Jun 2019

This tutorial explains how to use Amazon Web Services (AWS) to create virtual servers to be used as a Galera Cluster. It will explain how to create and configure AWS, as well as how to install and configure the database and Galera software on each node. It’ll end by showing you how to start the cluster.

Galera Cluster Migration Factors

Length: 2087 words; Writer: Staff; Pub: Oct 2014

If you have an existing database, but aren’t yet using Galera Cluster, you’ll have to migrate your data. This has to be done a particular way. This tutorial article will help you to understand the concepts involved and take you through the steps to migrate a database.

Getting Started Galera with Docker

Length: 1416 words; Writer: Erkan Yanar; Pub: May 2015

Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. This first of two articles on using Galera with Docker explains how to build a basic Docker Image and locally deploy it on a test cluster. It also describes how to deploy Galera Cluster over multiple Docker hosts.