You can quickly and easily deploy a high-availability (HA) MariaDB service by using LINBIT SDS components and DRBD Reactor as a cluster manager. Making your database service highly available, especially if it’s the back-end service to a crucial application or other service, can help keep your customers or coworkers who depend on it up and running and help you maintain uptime SLAs.
DRBD Reactor is a cluster resource manager developed by LINBIT® that can be simpler to configure and implement than a Pacemaker and Corosync solution. You can even use Open Cluster Framework (OCF) resource agents (RAs) in your configurations. This particular deployment uses the Filesystem
RA to handle mounting the file system that backs the database’s data directory. The deployment also uses the IPaddr2
RA to handle a virtual IP address so that no matter which cluster node is actively hosting services, you can reach those services from a single persistent IP address.
LINBIT SDS software components include LINSTOR® and DRBD®. DRBD handles replicating the database’s data directory across your cluster nodes. LINSTOR is the block storage manager that you will use to realize the “quickly and easily” aspects of this deployment. By using LINSTOR, you can quickly define your storage and have LINSTOR deploy it to your specifications across your cluster, including configuring DRBD resources. You might never edit a DRBD .res
file again!
The deployment instructions also show you how to configure a particular feature of DRBD Reactor: the promoter plug-in’s “freeze” ability. This feature can be especially useful for large database and HA use cases where managed services might take a long time to start and when there could be a network outage affecting your entire cluster network. While this type of event should be rare in a properly set up production environment with fault tolerance and redundant networks, it could be a more common scenario in cloud-hosted platforms. In that case:
- There is a network outage across entire cluster network.
- DRBD Reactor freezes managed services on active node.
- Because the outage is network-wide, the nodes cannot reach each other, and so DRBD Reactor cannot fail over services to another node because there is no quorum within the cluster.
- Network issue resolves.
- DRBD Reactor notices formerly active node is online again.
- DRBD Reactor reactivates services on formerly active node, thanks to some internally sophisticated logic.
- Frozen services on formerly active node “thaw”, rather than “start.”
- Services restored in seconds after the network is back online rather than minutes, because they don’t have to start “from scratch.”
If this scenario or an easier HA MariaDB deployment appeals to you, you can find the instructions for setting this up in a RHEL or Ubuntu cluster in this LINBIT technical guide: Using LINSTOR and DRBD Reactor to Deploy a Highly Available MariaDB Service.