search
Get Started
search
Galera Cluster - Database
zoom_in Click to enlarge

Galera Cluster

language

description Galera Cluster Overview

A Galera Cluster is an open source MySQL extension enabling a synchronous multi-master database environment. It provides high availability and data redundancy through real-time replication across multiple nodes. This technology is particularly useful for applications requiring continuous operation and disaster recovery, benefiting system administrators managing MySQL databases needing robust reliability and minimal downtime.

help Galera Cluster FAQ

Which databases and distributions support Galera Cluster for multi-master replication?

Galera Cluster is available for MySQL via the wsrep patch, for MariaDB through the MariaDB Galera Cluster package, and as Percona XtraDB Cluster from Percona. All three distributions use the same wsrep provider (Galera replication library) under the hood. PostgreSQL does not use Galera; it relies on native streaming replication or tools like Patroni for HA.

What happens during a network partition or split-brain in Galera Cluster?

Galera uses a weighted quorum voting system where the partition containing the majority of nodes (by weight) remains operational as the primary component. The minority partition automatically switches to a read-only, non-operational state to prevent split-brain writes. A minimum of three nodes is recommended so that a single-node failure always leaves a majority quorum intact.

How does Galera Cluster handle write conflicts in a multi-master setup?

Galera uses optimistic certification-based conflict detection: each node applies writes locally first, then broadcasts the transaction for certification across the cluster. If two nodes commit conflicting writes to the same rows near-simultaneously, the certification process on each node determines a winner based on transaction ordering and rolls back the loser. This means application-level conflict rates are low but developers should be aware that multi-master writes to the same rows can occasionally result in deadlocks.

How many nodes should a Galera Cluster have, and does adding nodes affect write performance?

Galera Clusters typically use 3 or 5 nodes, with odd numbers preferred to simplify quorum calculations. While Galera technically supports more nodes, each additional node increases the certification and replication overhead for every committed transaction because all writes must be replicated synchronously. This means write throughput does not scale linearly with node count the way read throughput does.

Reviews & Comments

Write a Review

rate_review

Be the first to review

Share your thoughts with the community and help others make better decisions.

Save to your list

Save your favorites and follow how their scores change over time.

Save favorites
Track changes
Compare scores

Already have an account? Sign in

Compare Items

See how they stack up against each other

Comparing
VS
Select 1 more item to compare