Deploy a Highly Available MariaDB Service Using LINSTOR & DRBD Reactor Tech Guide

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:

  1. There is a network outage across entire cluster network.
  2. DRBD Reactor freezes managed services on active node.
  3. 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.
  4. Network issue resolves.
  5. DRBD Reactor notices formerly active node is online again.
  6. DRBD Reactor reactivates services on formerly active node, thanks to some internally sophisticated logic.
  7. Frozen services on formerly active node “thaw”, rather than “start.”
  8. 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.

Michael Troutman

Michael Troutman

Michael Troutman has an extensive background working in systems administration, networking, and technical support, and has worked with Linux since the early 2000s. Michael's interest in writing goes back to an avid reading filled childhood. Somewhere he still has the rejection letter from a publisher for a choose-your-own-adventure style novella, set in the world of a then popular science fiction role-playing game, cowritten with his grandmother (a romance novelist and travel writer) when at the tender age of 10. In the spirit of the open source community in which LINBIT thrives, Michael works as a Documentation Specialist to help LINBIT document its software and its many uses so that it may be widely understood and used.

Talk to us

LINBIT is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please tick above to say how you would like us to contact you.

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit below, you consent to allow LINBIT to store and process the personal information submitted above to provide you the content requested.

Talk to us

LINBIT is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please tick above to say how you would like us to contact you.

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit below, you consent to allow LINBIT to store and process the personal information submitted above to provide you the content requested.