December 26, 2017

How to Create and Configure a Cloud Galera Cluster with MariaDB 10.0.32 on Ubuntu 17.04 Servers

Introduction

Galera Clustering adds high availability to your database by updating the changes to different MariaDB servers. In the event that one of the instances fails, the other quickly take over and available to continue serving.

There are two cluster configurations, active-passive and active-active. in active-passive clusters, all writes are done on a single server and then copied to one or more passive servers that are poised to take over only in the event of an active server failure. Some active-passive clusters also allow SELECT operations on passive nodes. In an active-active cluster, every node is read-write and a change made to one is replicated to all.

In this guide, we will configure an active-active Cloud MariaDB Galera cluster. For demonstration purposes, we will configure and test three Amazon AWS or Microsoft Azure servers in different regions. Later we create NGINX web servers that rely on our cluster servers.  In this case, we have a super fast web server in all regions and a high availability databases.

Prerequisites:

To continue with our guide you need:

  • Minimal Three Cloud Ubuntu 16.04 servers in a different zone or even more Cloud servers if you want more zones. If possible for the best performance select the same type of Cloud server for each zone.

Once you are ready for the basic setup and al the cloud servers are up and running, we are ready to install MariaDB

Step 1 — Adding the MariaDB 10.1 Repositories to All Servers,

By default the MariaDB 10.1 isn´t included in the default Ubuntu Repositories, so we start by adding this external Ubuntu repository maintained by the MariaDB project for all of our Cloud Servers.

Note: MariaDB is a well-respected provider, but not all external repositories are reliable. Be sure to install only from trusted sources.

First, we”ll add the MariaDB repository key with the commandapt-key, which apt will use to verify that the package is authentic.

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
Share

You may also like...

Leave a Reply

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