MariaDB

MariaDB design · Galera clusters · tuning

Forked from MySQL and now evolving on its own path, MariaDB has its own strengths. We run Galera Cluster synchronous replication, MaxScale routing, mariadb-backup and LTS version management the way the engine expects.

Architecture

Galera Cluster architecture

Galera certifies each write-set at commit time (virtually synchronous replication), producing a multi-primary cluster in which every node holds the same data.

If a node fails, service continues as long as the remaining nodes keep quorum. Putting MaxScale (or ProxySQL) in front to send writes to one node and spread reads reduces rollbacks caused by write conflicts.

Remote DR is usually built with asynchronous replication between Galera clusters.

  • Ensure quorum with at least 3 nodes (or 2 nodes + Galera Arbitrator)
  • Every table must be InnoDB with a primary key
  • Split large transactions (flow-control and certification-failure risk)
  • Know the IST/SST method and duration for node rejoins in advance
Figure. MariaDB Galera Cluster reference design (example)

Scope

MariaDB service scope

Install & design

LTS version choice, storage-engine and charset standards, parameter standards, package repositories.

HA & replication

Galera Cluster, GTID async/semi-sync replication, MaxScale failure detection and failover.

Backup & PITR

mariadb-backup full/incremental, mariadb-dump logical backups, binlog point-in-time recovery.

Tuning

InnoDB buffer pool and logs, thread pool, optimiser settings, slow queries and indexes.

Monitoring

wsrep_* status (flow control, queues), replication lag, PMM and Grafana dashboards.

Upgrades

LTS-to-LTS upgrades (e.g. 10.6 → 10.11/11.4/11.8), mariadb-upgrade, rolling upgrades.

Security

Accounts and roles, TLS, server_audit plugin logging, data-at-rest encryption.

MySQL ↔ MariaDB

Review compatibility gaps (GTID format, system tables, auth plugins) before switching.

Replication

HA options compared

MariaDB replication and HA options
OptionWhat it isGood forWatch out for
Galera ClusterCertification-based virtually synchronous, multi-primaryMinimal RPO, node-failure toleranceNot a write-scaling tool; sensitive to WAN latency
Async / semi-sync replicationMariaDB-specific GTID (domain-server-seq)Read scaling, DRGTID format differs from MySQL — take care in mixed setups
MaxScalereadwritesplit routing, monitoring and automatic failoverProxy in front of Galera or replicationCheck BSL licence terms before use
ProxySQLRule-based query routingWhen an open-source proxy is preferredNeeds Galera node-state health checks

Backup & PITR

Backup and point-in-time recovery

mariadb-backup full backup and restore
# Backup
mariadb-backup --backup --target-dir=/backup/full_20261020 \
               --user=bkuser --password='***'
# Prepare, then restore
mariadb-backup --prepare  --target-dir=/backup/full_20261020
systemctl stop mariadb      # datadir must be empty
mariadb-backup --copy-back --target-dir=/backup/full_20261020
chown -R mysql:mysql /var/lib/mysql && systemctl start mariadb
Galera health query
SHOW GLOBAL STATUS WHERE Variable_name IN (
  'wsrep_cluster_size',         -- number of nodes
  'wsrep_cluster_status',       -- should be Primary
  'wsrep_local_state_comment',  -- should be Synced
  'wsrep_flow_control_paused',  -- share of time paused by flow control
  'wsrep_local_recv_queue_avg'  -- average receive queue
);
Older releases ship the same tool as mariabackup. We confirm commands against the documentation for your version.

Tuning

Where we tune

Server & Galera

  • innodb_buffer_pool_size, log file size, flush settings
  • Consider thread_handling=pool-of-threads (thread pool)
  • wsrep_slave_threads (apply parallelism) and gcache size
  • Identify the node causing flow control
  • SST method (mariadb-backup) and donor load

Queries & schema

  • Slow query log and ANALYZE FORMAT=JSON
  • Fix tables without primary keys (a Galera requirement)
  • Indexes, join order and optimizer_switch
  • Split bulk DML into batches
  • Partitioning and retention

Lifecycle

LTS lifecycle check (as of October 2026)

  • Community LTS series: 10.11 · 11.4 · 11.8 · 12.3 (each with its own end-of-maintenance date)
  • MariaDB 10.6 reached end of community maintenance in July 2026 — plan an upgrade to a newer LTS
  • Short-term (rolling) releases have short support windows; use LTS in production
Source: mariadb.org release announcement (Q3 2026). Re-check official dates before acting.

FAQ

Frequently asked questions

Does Galera increase write throughput?

No. Every node applies every write, so Galera is about availability and data protection, not write scaling. Write scaling needs a different design such as sharding.

Is moving between MySQL and MariaDB easy?

They were highly compatible early on, but have diverged: GTID format, system tables, JSON handling and authentication now differ. You need a dump/replication transition plan and compatibility testing.

Can Galera run on two nodes?

With only two nodes, losing one means losing quorum. We recommend adding Galera Arbitrator (garbd) as a third voter.

What can replace MaxScale?

ProxySQL, or HAProxy with health-check scripts. MaxScale uses the BSL licence, so check its terms first.

Shall we start by reviewing your cloud and databases as they are today?

Tell us your clouds, database versions, topology and concerns, and we will propose an assessment scope and approach.