To ensure the data's high availability and performance it is required to implement database clusterization. Today we will explain how to smoothly install out-of-the-box clustering for MariaDB/MySQL within the cloud.

Within this auto-clustered solution can be named such benefits as:

  • high availability with pre-configured replication options - Master-Slave, Master-Master, Galera
  • scalability and autodiscovery – new nodes, added during horizontal scaling, are connected to the cluster with all required adjustments being applied automatically
  • efficient load balancing – each cluster is supplemented with two ProxySQL nodes for load balancing with automatic splitting of read/write requests
  • automated failover – the database nodes that are temporarily unavailable or have high latency are automatically excluded from the cluster and re-added once the connection is restored

Auto Clustered Database

To enable auto clustering for MariaDB/MySQL database let’s perform several easy steps.

  1. Log in to your Cloudlets dashboard.

Click New Environment at the dashboard

and choose MariaDB or MySQL database.

Activate the Auto-Clustering button and choose the required replication scheme:

  • MariaDB - Master-Slave, Master-Master, and Galera
  • MySQL - Master-Slave and Master-Master

Auto-Clustering Options

Choose the replication type you prefer, add the necessary number of nodes.

Highly Available ProxySQL Load Balancer

Each MariaDB/MySQL auto-clustering solution has two ProxySQL nodes enabled by default in front of the database cluster. Before the installation process you can exclude them if needed.

Database Cluster Access Credentials

Cloudlets platform automatically generates database access credentials. However, it is possible to override credentials:

1. Click on the Variables button.

2. Press Add to provide custom user’s database credentials via two variables DB_USER and DB_PASS as follows:

3. Press Apply. You will be mailed with the custom credentials for access to the PHP MyAdmin at Master Node and database cluster Entry Point.

Cluster Horizontal Scaling

You can configure the scaling for the master-slave/master-master topologies with an extra database node, it will be created via cloning an existing slave node. After the completion of the cloning procedure the database on the new cluster member catches up data via binlog replay guaranteeing the binlog will never expire and horizontal scaling takes a short period of time.

Cluster Layers Isolation

You can decide what layers you will expose outside - all or the entry point proxy layer only. Just switch ON/OFF the SLB access switch into the required position for each layer and click Create.

In several seconds your cluster will be up and running.

Database Cluster Access Information

After successful installation, you’ll receive several emails with the cluster details:

  • PHP MyAdmin at Master Node web administration interface with credentials to access the database server for interactive management
  • Entry Point for Connections to MySQL Cluster - hostname and credentials for connecting an application to the database cluster. These nodes form a proxy layer referred to as the entry point for the database cluster with hostname as follows: proxy.${envName}.${platformDomain}.
  • Cluster Orchestrator Panel - credentials to access the Orchestrator panel, intended for convenient cluster management. Use the received credentials to access admin panel of cluster Orchestrator installed on ProxySQL node, that provides a possibility to review the cluster topology information: slick visualization of topologies, replication problems if there are any, read/write distribution, state of health check-ups and autodiscovery of newly added DB nodes, etc.

To try it out on your own and install out of the box auto clustered MariaDB/MySQL clustering at Cloudlets Australia just register for free at https://cloudlets.com.au/