mariadb-impl-galera-cluster

Installation
SKILL.md

MariaDB Galera Cluster

Galera is a synchronous multi-master cluster built on certification-based replication. Every node can serve reads and writes, write-sets are replicated to every other node, and conflicts are detected at COMMIT time. This skill covers cluster sizing, bootstrap and join procedures, SST method choice, weighted quorum, monitoring, and the application-side retry strategy that Galera REQUIRES.

Quick Reference

  • ALWAYS run a minimum of 3 nodes. A 2-node cluster cannot form a stable quorum and either goes read-only on any partition or splits brains when each node assumes the other is dead.
  • ALWAYS use mariabackup as the SST method on production clusters. rsync blocks the donor with a read lock and mysqldump is logical, slow, and also blocks the donor.
  • ALWAYS keep every node on the SAME MariaDB minor version. Heterogeneous clusters cause replication mismatch and SST-stream incompatibility.
  • ALWAYS retry transactions on ER_LOCK_DEADLOCK (error 1213). Galera reports certification failures as deadlocks AT COMMIT TIME, even when the local node never touched a conflicting row.
  • ALWAYS set binlog_format=ROW, default_storage_engine=InnoDB, and innodb_autoinc_lock_mode=2 on every node. Galera does not support STATEMENT format or non-InnoDB tables.
  • ALWAYS use 3+ nodes OR add a garbd arbitrator (zero-data quorum-vote node) when running an even-numbered cluster across two data-centres.
  • ALWAYS bootstrap the FIRST node with galera_new_cluster (or mariadbd --wsrep-new-cluster). Subsequent nodes start normally with wsrep_cluster_address=gcomm://node1,node2,node3.
  • NEVER point application writes at multiple Galera nodes for the same hot row. Concurrent updates to one row from many nodes cause a cert-failure storm and roll back at COMMIT on every node but one.
  • NEVER run mysqldump SST in production. Donor is locked for the entire dump duration ; on multi-GB schemas this is hours.
  • NEVER scale reads by reading from every Galera node mid-SST. The donor lags during the transfer and serves stale data.
  • NEVER use a 2-node cluster without pc.weight weighted quorum or a garbd arbitrator. There is no safe partition outcome.
  • For read-scaling : add an ASYNC replica off ONE Galera node using standard primary-replica replication, not from every Galera node.
Installs
1
GitHub Stars
2
First Seen
Oct 9, 2026