MariaDB SkySQL Adds Clustering for Continuous Availability

Many MariaDB customers already use MariaDB Enterprise Cluster, powered by Galera Cluster, which provides virtually-synchronous multi-master clustering with high availability for mission-critical applications. This functionality is now available in MariaDB SkySQL as the new Cluster topology of MariaDB Platform for Transactions.

The Cluster features are:

  • Virtually-synchronous replication, no replication lag (at the cost of commit latency)
  • Multi-Master, all nodes can process reads and writes
  • All nodes are of the same state, which allows instant failover
  • Automatic synchronization and cluster management
  • Support for MariaDB GTIDs for asynchronous MariaDB replication between Clusters (with MariaDB Enterprise Server 10.5)
  • Streaming based replication for large transactions

MariaDB SkySQL includes three transactional topologies to choose from: Standalone, primary/replica and cluster.

Cluster Management – On-premises vs SkySQL

Deploying a Cluster is by its nature more complex than running a single-node instance of MariaDB Enterprise Server. For an on-premises installation, the complexity is managed by DBAs, DevOps and Sys-Admins. Deploying a cluster on MariaDB SkySQL removes this burden from internal resources.

There are a number of considerations that must be managed in an on-premises cluster deployment. The interconnects between the different nodes of a cluster are a critical path, as the virtually-synchronous behavior means transactions need to be committed to all nodes. Higher security requirements need to be taken into account, guaranteeing fast and secure communication between the nodes while ensuring that external access to the data is prohibited.

A self-healing cluster, where the replacement for a failed node needs to join a cluster automatically, including a full or incremental synchronization, requires resource-optimized settings to ensure the quickest possible rejoining without adding excessive overhead to the overall cluster load.

A suitable solution to balance the load between the application and MariaDB Enterprise Cluster is needed, and must account for the possibility of failover. This is simplified for our MariaDB Platform customers with the use of the MariaDB MaxScale database proxy. Since MariaDB MaxScale sits between the application and the database, there is no need to make changes to the application.

While these design requirements exist for clusters deployed on-premises or on SkySQL, they are managed for you when using SkySQL. All you need to do is to:

  1. Choose your server size
  2. Specify the number of nodes in the cluster (which can be between 3 and 9)
  3. Set up your application to connect to your database

High Availability and Read Scalability

MariaDB Enterprise Cluster is a multi-master replication solution based on Galera Cluster that can be deployed when read loads exceed the capacity of a single server. The cluster topology maintains data consistency, provides automatic failover for high availability, and provides read scalability. MariaDB SkySQL Platform for Transactions with a Cluster topology brings these benefits to the cloud.

When creating a MariaDB Enterprise Cluster environment, connections are routed to the provisioned nodes via a MariaDB MaxScale instance. Any server failures are addressed in the background while MaxScale assures that your database service continues to work by routing requests to available nodes. The cluster nodes are spread across different availability zones within a region, adding another level of fault tolerance to the overall cluster.

MariaDB Enterprise Cluster supports handling of both read and write transactions simultaneously on all nodes. However with this technology, all nodes of a cluster still need to execute the writes to keep them in the same state. Conflicts can occur, especially when applications use some tables as “hot spots”, with a high number of updates. Such conflicts usually have to be handled by the application, but not all legacy applications are cluster-aware.

We solve this challenge on SkySQL by taking advantage of the Read/Write Split filter provided by MariaDB MaxScale.

  • MaxScale uses one of the nodes of the cluster as the primary node. It routes all writes, or transactions that include write operations, to this primary node. In case of a failure of this node, another node will take over this role immediately, assuring that writes can always be processed.
  • Read operations cannot result in a conflict. MaxScale therefore can balance all read operations between the non-primary nodes, providing the best possible read scalability.

Making Clusters Easy

MariaDB Enterprise Cluster for SkySQL is only one of our replication solutions. Now in Technical Preview, MariaDB Enterprise Cluster for SkySQL is well suited for customers who are currently using a cluster topology and now want to ease the management burden with a cloud database as a service.

For customers looking for the additional benefits of write scaling and elasticity, MariaDB Platform for Distributed SQL on MariaDB SkySQL will be an excellent option.

For More Information

Try MariaDB SkySQL

Read more about Cluster on SkySQL