How to set up Mariadb Galera cluster on Ubuntu or Debian Linux

Below is a sneak peek of this content!

MariaDB Galera Cluster

This guide explains how to set up MariaDB high-availability cluster for the database using the Galera library, which provides a virtual mater-to-master three-node cluster running on Debian or Ubuntu Linux.

Software and hardware requirements

  • Minimum three VMs running at cloud providers or bare metal servers in same zone or data center. Always keep an ODD number of servers (at least 3) when all the servers are in the same zone or data center. Please note that the MariaDB Galera cluster can exist between two or more zones/data centers. Galera Cluster requires server hardware for a minimum of three nodes. If your cluster runs on a single switch, use three nodes. If your cluster spans switches, use three switches. If your cluster spans networks, use three networks. If your cluster spans data centers, use three data centers. This ensures that the cluster can maintain a Primary Component in the event of network outages.
  • Ubuntu 20.04 or Debian 10/11 Linux LTS release. The instructions will not work on other operating systems such as FreeBSD or other Linux distros such as RHEL/SUSE due to different tools (e.g., firewall). However, one can always adopt it.
  • MariaDB server with Galera library on each VM. The cluster is made of two components (replication engine called Galera and database called MariaDB).
  • The MariaDB cluster is protected using password-based authentication, TLS, VLAN/VPC, and firewall for security and privacy. The cluster will not accept any traffic from the Internet or public interfaces at all.
This guide will cover the following topics:
TOC-MariaDB-Galera-Cluster.Welcome

To view this content, you must be a member of VIVEK's Patreon at $0.01 or more
Unlock with Patreon
Already a qualifying Patreon member? Refresh to access this content.

About the author: Vivek Gite is Editor-in-Chief and the man behind nixCraft and OpensourceFlare ✨. He creates and maintains content on both sites as accurately as possible. Since 2000 Vivek has written over 7k+ posts that have been read many times. He is a die-hard fan of FLOSS and a full-time Linux desktop user since 1996. OpensourceFlare provides in-depth guides about Linux, BSD, programming, and other IT topics for Patreon subscribers without any ads or tracking. Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or weekly email newsletter.

0 comments… add one

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. All comments must be on the topic, and offtopic comments will be automatically removed.