Select Page

Why Choose a Galera Based Clustering Solution for MySQL

Wesley Lifford | | February 2, 2016

Galera Cluster

Galera ClusterYou need your application to stay up and available in case of software/OS crash, network issues, or hardware failure. Simple Master/Slave replication is not Highly Available, since there will be some delay in your application’s availability even under the best of circumstances. Master/Master also has its share of downsides (Primary Key collisions and data drift just to name a couple) that are also amplified when you have network related issues. We could even consider using GTID based replication for data integrity across replication chain and use some of the MySQL utilities for faster failover/failback. Each has a trade-off of its own. Galera based clustering solutions eliminates these additional layers and provides looking for a pure synchronous HA solution. Galera based clustering solutions eliminates these additional layers and provides a pure synchronous HA solution.

Galera based clustering offers semi-synchronous replication, active-active multi-master topology (read and write to any node,) automatic cluster node joining, membership control, and dropping upon failure, parallel row-level replication, and no replication lag while providing a standard MySQL look and feel.

Galera based clustering works best when given a minimum of 3 data nodes. Yes, it is possible to run with only 2 data nodes and an arbitrator daemon on a 3rd node, but this configuration leaves you vulnerable to an outage when one of the data nodes suddenly has to assume all client requests because of a problem on the only other data node.

Overall, Galera based clustering is a robust and solid solution for high availability. Running on a 3 node Galera based cluster allows you to distribute writes and reads as you see fit while also allowing you to perform maintenance or schema upgrades without downtime.

Of course, this flexibility also comes with a price. You’ll need at least 3 nodes (and a way to load balance the connections to the cluster.) Because the writes have to be committed on all 3 nodes (take network latency into account), the overall system may be slightly slower than it would running standalone MySQL. The entire cluster will be as slow as the slowest node.

Currently, InnoDB is the only storage engine supported with Galera based replication. A primary key must also be defined on each table. Writes to tables of other storage engines are not replicated (DDL statements to the mysql tables are replicated). This means any other MyISAM tables would need to be converted to InnoDB before using Galera based clustering.

Galera cluster also has limitations on transaction size. The writesets are processed in memory and because of this, large transactions will impact performance. The default transaction limits are set for 128K rows and 1GB transaction size. These can be adjusted, but for best practices and performance, large transactions should be broken up into smaller chunks.

There are currently two forks of MySQL that you can use to setup a Galera based cluster, Percona or MariaDB. Deciding on which to use is a matter of personal preference.

12c Upgrade Bug with SQL Tuning Advisor

This blog post outlines steps to take on Oracle upgrade 11.2 to 12.1 if you’re having performance problems. Oracle offers a patch and work around to BUG 20540751.

Megan Elphingstone | March 22, 2017

Oracle EPM Cloud Vs. On-Premises: What’s the Difference?

EPM applications help measure the business performance. This post will help you choose the best EPM solutions for your organization’s needs and objectives.

Bobby Ellis | April 10, 2018

Tips for Upgrading From SQL 2008 to 2012 or 2014

It’s 2015 and you can now establish totally respectable MS SQL DBA credibility just by mentioning you have been in the game since SQL Server version 9. You may even get the same gasps of shock from some colleagues that used to be reserved for the version 6 veterans.

Andy McDermid | April 8, 2015

Work with Us

Let’s have a conversation about what you need to succeed and how we can help get you there.

CONTACT US

Work for Us

Where do you want to take your career? Explore exciting opportunities to join our team.

EXPLORE JOBS