Galera Cluster
activeby Codership (MariaDB plc) · since 2009 · also known as Galera, Galera Cluster for MySQL, wsrep
Synchronous multi-primary replication for MySQL and MariaDB, now owned by MariaDB plc.
Overview
Galera Cluster is a write-set replication (wsrep) library plus patched MySQL/MariaDB servers that turn a group of nodes into a virtually synchronous multi-primary cluster. Transactions execute locally, then their write-sets are broadcast and certified in a global order, which yields no lost commits on failover and consistent data on every node. Codership, the Finnish company behind it, was acquired by MariaDB plc in 2025; the library continues to power MariaDB Galera, Percona XtraDB Cluster and Codership's own MySQL builds. Treat it as an HA technology for 3-5 node clusters rather than a way to scale writes.
Strengths & trade-offs
Strengths
- +Certification-based replication gives zero committed-data loss on node failure
- +True multi-primary: any node can take writes
- +Parallel applier threads keep replicas close to real time
- +Automatic state transfer when nodes join or rejoin
- +Bundled with MariaDB and Percona, so widely packaged
Trade-offs
- −Write latency bounded by the slowest node round-trip
- −Conflicting writes from different nodes surface as deadlocks at commit
- −Schema changes via TOI block the cluster; RSU requires care
- −InnoDB only; MyISAM and some features are unsupported
Great for
- +High-availability MySQL/MariaDB clusters
- +Zero-RPO failover inside a region
- +Geographically spread read replicas with consistent data
- +Active-active setups behind a load balancer such as MaxScale or ProxySQL
Think twice for
- −Scaling write throughput
- −Large batch transactions
- −Unreliable or very high-latency networks
Capabilities
Native or official first-party support · 9 of 25 tracked
Scale & consistency
- Comfortable data size
- Medium · ≤ 10 TB
- Horizontal scaling
- None
- Multi-region
- Active active
- Transactions
- Full ACID
- Consistency
- Strong
- Schema
- Strict
- Architecture
- Multi primary, Distributed
- Query languages
- SQL
Every node stores and applies all data; adding nodes adds read capacity and resilience, not write capacity.
Deployment
Ecosystem
Alternatives to Galera Cluster
Percona Server plus Galera synchronous replication, packaged as an open-source HA MySQL cluster.
galera-cluster vs percona-xtradb-cluster →Community-led MySQL fork with extra storage engines, built-in Galera and a faster feature cadence.
galera-cluster vs mariadb →Shared-nothing, auto-sharded in-memory MySQL engine built for telecom-grade availability.
galera-cluster vs mysql-ndb-cluster →The web's default open-source SQL database, now on calendar versioning with 9.7 as the LTS line.
galera-cluster vs mysql →MySQL-compatible distributed SQL with a row store for OLTP and a columnar replica for real-time analytics.
galera-cluster vs tidb →Postgres-wire distributed SQL built to survive node, zone and region failures with serializable transactions.
galera-cluster vs cockroachdb →Galera Cluster FAQ
What is Galera Cluster?
Galera Cluster is a relational database by Codership (MariaDB plc), first released in 2009. Galera Cluster is a write-set replication (wsrep) library plus patched MySQL/MariaDB servers that turn a group of nodes into a virtually synchronous multi-primary cluster. Transactions execute locally, then their write-sets are broadcast and certified in a global order, which yields no lost commits on failover and consistent data on every node. Codership, the Finnish company behind it, was acquired by MariaDB plc in 2025; the library continues to power MariaDB Galera, Percona XtraDB Cluster and Codership's own MySQL builds. Treat it as an HA technology for 3-5 node clusters rather than a way to scale writes.
Is Galera Cluster open source?
Yes. Galera Cluster is open source. License: GPL-2.0.
Does Galera Cluster support ACID transactions?
Yes. Galera Cluster supports full ACID transactions, with strong consistency.
Does Galera Cluster scale horizontally?
Galera Cluster does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at medium scale (≤ 10 TB). It supports active-active multi-region writes.
How can I run Galera Cluster?
You can self-host it. Managed offerings include MariaDB Cloud (Galera topology).
What is Galera Cluster best for?
Galera Cluster is a strong fit for high-availability MySQL/MariaDB clusters, zero-RPO failover inside a region and geographically spread read replicas with consistent data. Think twice for scaling write throughput.
What are the best alternatives to Galera Cluster?
Common alternatives to Galera Cluster include Percona XtraDB Cluster, MariaDB, MySQL NDB Cluster, MySQL and TiDB. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
How popular is Galera Cluster?
Galera Cluster ranks #304 of 844 databases on the WhichDB Score (10.0/100), and #98 among relational databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.