Free audit

View Audit Scope
MariaDBGalera 4, semi-sync GTID & MaxScale failover

MariaDB High Availability & Failover Architecture

JusDB designs, builds, and operates MariaDB high availability architectures using Galera 4 synchronous clusters, lossless semi-synchronous GTID replication, and MariaDB MaxScale automated failover. Database engineers engineer odd-node quorum, fence split-brain scenarios, and rehearse multi-AZ and cross-region failovers across Linux VMs, Kubernetes, and Amazon RDS, with 24/7 support.

The first 30-minute call covers your databases, current ownership, and required coverage. No production access is needed. Or request a free audit of one database instance.

  • NDA before access
  • Read-only by default
  • Written scope before work starts

MariaDB HA topologies

Select a topology pattern

Synchronous multi-primary Galera 4 cluster

RPO = 0 intra-region

3- or 5-node certification-based synchronous cluster across availability zones, paired with MaxScale readwritesplit to pin writes and distribute causal reads.

Best when intra-region network RTT is under 2ms and zero lost transactions on node failure is required.

Explore Galera Cluster architecture

Topologies engineered using Galera 4, MariaDB GTID semi-sync, and MaxScale.

Replication models
Galera 4 synchronous multi-primary, lossless semi-sync GTID (AFTER_SYNC), and cross-region async DR
Routing & fencing
MariaDB MaxScale readwritesplit, causal_reads, Keepalived VRRP, and garbd quorum
Response SLA
15 mins for a critical (P1) cluster outage, 24/7. See details

Selected clients

  • Innoviti
  • Blitz
  • Freecharge
  • Nango
  • Recochain
  • Screen Facts
  • Nexora
  • WeCredit

When teams call us

MariaDB high availability failure modes we eliminate

Most MariaDB outages during a hardware or AZ failure come from even-node split-brain, asynchronous errant GTIDs, stale replica reads, or connection pools that fail to reconnect.

Common MariaDB HA failure modes, what is usually happening, and where JusDB engineers start
Failure modeWhat is usually happeningWhere we start
2-node split-brainA network blip between 2 nodes either halts both or corrupts dataA 2-node Galera or failover cluster without an odd quorum voter (garbd arbitrator or 3rd witness node) cannot form a 51% majority when the link drops.Deploy a 3rd data node or lightweight garbd arbitrator in a third availability zone, and audit pc.weight quorum settings across all members.
Errant GTID transactionsFormer primary rejoins after crash with conflicting transactionsAsynchronous replication acknowledged writes locally before shipping binlogs, or an unfenced old primary accepted stray app writes before shutdown.Enable rpl_semi_sync_master_wait_point=AFTER_SYNC, enforce read_only=ON by default in my.cnf, and configure MaxScale cooperative locking and fencing.
Stale read-after-writeUsers save a record and immediately see old data on the next page loadA read/write splitter routes the follow-up SELECT to an asynchronous replica that is 150ms behind applying the primary's binary log.Configure MaxScale readwritesplit with causal_reads=local or fast and master_accept_reads=true so session-dependent reads wait for the GTID or route to primary.
Connection pool blackholeDatabase fails over in 8 seconds, but the app stays down for 15 minutesApplication JDBC/Node/Go pools cache DNS IPs indefinitely or hold half-open TCP sockets pointing at the dead primary.Place redundant MaxScale + Keepalived VIPs in front of the cluster, enable transaction_replay, and tune application pool TTL and socket timeouts.
WAN Galera commit lagStretching a Galera cluster across distant regions triples write latencyGalera certifies every transaction synchronously across all nodes; a 60ms cross-region RTT adds 60ms minimum floor to every COMMIT.Assign gmcast.segment IDs per region to minimize cross-WAN traffic, or refactor to local Galera HA + asynchronous GTID replication to the DR region.
Untested failover runbookNobody knows if automated failover works until an AZ outage hitsMonitoring scripts, VIP permissions, or GTID auto-positioning broke silently months ago after an OS or network change.Run scheduled chaos and switchover drills using maxctrl switchover and fenced network isolation on staging and production maintenance windows.

Delivery workflow and incident response

How JusDB builds and supports high-availability MariaDB

We design, build, and drill your failover architecture before production depends on it. 24/7 support. SLA response times: P1 – 15 mins | P2 – 30 mins | P3 – 60 mins.

Four-step MariaDB HA engineering workflow

  1. Assess

    Audit RPO/RTO targets, write profile, and AZ latency

    We measure transaction rates, cross-AZ RTT, and application connection pool behavior.

  2. Architect

    Design Galera 4 or lossless semi-sync GTID topology

    Written blueprint covering quorum votes, MaxScale readwritesplit, VIPs, and DR replication.

  3. Build

    Deploy fenced cluster, proxies, and mariabackup PITR

    Configure gtid_strict_mode, AFTER_SYNC or wsrep providers, and automated health checks.

  4. Rehearse

    Run switchover and crash drills with your team

    Time real failover and application reconnect behavior before handing over the runbook.

SLA response times for cluster incidents

  • 15 mins

    P1 · Critical

    P1 incidents

  • 30 mins

    P2 · High

    P2 incidents

  • 60 mins

    P3 · Medium

    P3 incidents

SeverityResponse SLADefinitionChannel & coverage
P1 · Critical15 minsProduction database down, primary unreachable, data corruption risk, or active failover event.24/7 · Direct PagerDuty, Opsgenie, or phone page plus incident bridge
P2 · High30 minsSevere latency spike, replication lag climbing rapidly, connection exhaustion, or degraded HA node.24/7 · On-call alert plus shared Slack or Teams channel
P3 · Medium60 minsNon-critical slow query regression, staging issue, backup warning, configuration question, or planned operational request.24/7 · Shared Slack or Teams channel or support ticket

Our engineering team is in India (IST, UTC+5:30) and provides 24/7 support.

Response means an on-call engineer is working the incident, not an automated reply.

HA capabilities

What does a MariaDB high availability engagement include?

We cover replication topology selection, MaxScale failover routing, split-brain quorum protection, rehearsed switchover drills, cross-region DR, and 24/7 monitoring.

  • Galera 4 vs Semi-Sync topology design

    We select and engineer the right replication topology for your write profile, network latency, and recovery objectives.

    • 3- or 5-node Galera 4 multi-primary clusters with odd-vote quorum
    • Lossless semi-synchronous GTID replication (AFTER_SYNC) for write-heavy workloads

    Galera 4 · rpl_semi_sync_master_wait_point=AFTER_SYNC · gtid_domain_id

    MariaDB Galera Cluster services
  • MaxScale failover & read/write routing

    Redundant proxy tiers that hide topology changes from your application and keep connections alive during promotions.

    • mariadbmon and galeramon automated promotion with fencing hooks
    • readwritesplit with causal_reads and automatic transaction_replay

    MariaDB MaxScale · maxctrl · Keepalived VRRP · ProxySQL

    MariaDB MaxScale routing
  • Split-brain fencing & quorum engineering

    Prevent dual-primary writes during network partitions across availability zones and data centers.

    • Third-AZ garbd arbitrator deployment and pc.weight quorum calculation
    • Default read_only=ON startup guards and STONITH / VIP fencing scripts

    garbd · pc.weight · cooperative_monitoring_locks · Keepalived

  • Rehearsed failover & chaos drills

    An HA architecture is only real once you have measured actual application recovery time under load.

    • Planned switchovers (maxctrl call command mariadbmon switchover) and crash tests
    • Verification of application connection pool recovery and zero errant GTIDs

    maxctrl · pt-table-checksum · gtid_Strict_mode=ON

  • Cross-region disaster recovery & PITR

    Combine local sub-minute failover with geographically isolated disaster recovery and point-in-time backups.

    • Async GTID domain replication from a Galera cluster to a remote DR region
    • mariabackup + binary log archiving for rollback from logical human errors

    gtid_slave_pos · mariabackup · mysqlbinlog · S3 archiving

  • 24/7 HA monitoring

    Continuous monitoring of replication lag, flow control, and proxy health backed by on-call MariaDB engineers.

    • P1 response SLA: 15 mins, 24/7
    • Alerts on wsrep_cluster_size, semi-sync fallback to async, and replica lag

    Percona Monitoring and Management (PMM) · Prometheus · PagerDuty

    MariaDB support services

Failover behavior and written evidence

How lossless semi-sync and fencing prevent errant GTIDs

Promoting an asynchronous replica during a crash loses unshipped commits and creates errant GTIDs when the old primary returns. AFTER_SYNC semi-synchronous replication and MaxScale fencing close that gap.

Primary and two replicas across three availability zones

Choose a state to see how writes, GTIDs, and MaxScale routing behave.

Application and MariaDB MaxScale readwritesplit

Redundant MaxScale proxies route writes to Primary (AZ-1) and distribute causal reads across Replicas in AZ-2 and AZ-3.

Lossless AFTER_SYNC · 0.05s lag
  • Primary (AZ-1)

    Waits for at least 1 replica ACK before returning COMMIT

    AFTER_SYNC · read_only=OFF

  • Replica 1 (AZ-2)

    Acknowledges binlog receipt in < 1ms and applies in parallel

    Semi-sync ON · 0.05s lag

  • Replica 2 (AZ-3)

    Second semi-sync ACK partner + mariabackup donor

    Semi-sync ON · 0.08s lag

With rpl_semi_sync_master_wait_point=AFTER_SYNC, MariaDB does not make a commit visible to clients until at least one replica has flushed the event to its relay log.

Example HA configuration from a rehearsed failover buildSample deliverable

HA architecture specimen

Replaced manual async promotion with lossless AFTER_SYNC and MaxScale auto-failover

During a previous AZ outage, manual promotion of an asynchronous replica took 27 minutes and stranded 1,400 orders as errant GTIDs. Configuring rpl_semi_sync_master_wait_point=AFTER_SYNC and mariadbmon with transaction_replay=true reduced measured switchover time to 6.4 seconds with zero lost commits.

Measured failover time27m → 6.4s
Errant GTIDs in drill0 transactions

1. MariaDB lossless semi-synchronous & strict GTID server config

[mariadb]
read_only                          = ON
gtid_domain_id                     = 1
gtid_strict_mode                   = ON
rpl_semi_sync_master_enabled       = ON
rpl_semi_sync_slave_enabled        = ON
rpl_semi_sync_master_wait_point    = AFTER_SYNC
rpl_semi_sync_master_timeout       = 1000
slave_parallel_threads             = 8
slave_parallel_mode                = optimistic

2. MaxScale mariadbmon cooperative failover & replay config

[MariaDB-HA-Monitor]
type                          = monitor
module                        = mariadbmon
servers                       = db1,db2,db3
auto_failover                 = true
auto_rejoin                   = true
enforce_read_only             = true
cooperative_monitoring_locks  = majority_of_all

Your team and ours

What managed MariaDB cloud services still leave to your team

Managed cloud databases automate much of the infrastructure layer, but your team still owns query performance, capacity, cost, and incident decisions.

Who handles each part of MariaDB high availability on a managed cloud service versus your own servers
AreaManaged cloud (Amazon RDS Multi-AZ)Your own Linux VMs or Kubernetes
Multi-AZ network links, VMs, and cloud load balancersAmazon RDS Multi-AZ provisions standby compute and storage.Your infrastructure team, architected across 3 AZs with JusDB.
Galera 4 quorum vs semi-synchronous GTID architectureRDS Multi-AZ uses block-level standby only; it does not provide multi-node Galera or MaxScale causal read routing.Designed, deployed, and tuned end to end by JusDB engineers.
Application connection pooling, causal reads, and transaction replayYours. RDS flips a DNS CNAME on failover; your application still drops in-flight queries unless a smart proxy sits in front.Handled by JusDB with redundant MariaDB MaxScale or ProxySQL clusters.
Split-brain fencing and errant GTID preventionManaged within a single RDS Multi-AZ pair, but cross-region read replicas remain asynchronous and can lag or diverge.Engineered with gtid_strict_mode=ON, AFTER_SYNC, and MaxScale fencing.
Scheduled failover drills and RTO/RPO verificationYou still have to trigger RDS reboot-with-failover tests and measure how your application behaves.Planned, executed, and documented by JusDB during agreed drill windows.

Your team keeps control

  • Set business priorities, application requirements, and release plans
  • Approve production changes, except routine actions you have pre-approved
  • Own your cloud accounts, access policies, and vendor relationships
  • Decide when maintenance can happen and how quickly service must recover
  • Move the work in-house or to another provider after your agreement's notice period, with your data returned or deleted and the transition help your agreement sets out (Terms, section 8)

JusDB handles the agreed HA engineering

  • Monitor database health, investigate alerts, and involve the right people
  • Review query performance, replication, capacity, and backup health
  • Carry out approved changes and update the operating instructions they affect
  • Report completed work, open risks, and recommended next steps

MariaDB HA components we engineer

Compare options

How a JusDB MariaDB HA architecture compares with DIY scripts and single-AZ setups

Compare an engineered Galera 4 or lossless semi-sync MaxScale topology against basic cloud single-primary setups or custom bash failover scripts.

Evaluation Vector
JusDB DBRE
In-House DBALegacy AgencyDeveloper Generalist
Galera Multi-Master Replication & QuorumVirtually synchronous Galera 4 multi-master replication with certification-based conflict resolution, strict odd-node quorum, and drill-tested recovery.Standard async primary-replica replication or misconfigured 2-node Galera clusters lacking quorum arbitrators.Relies on basic master-slave setups with manual failover scripts that introduce replication lag and transaction loss.Deploys single-node database instances with cloud disk snapshots, claiming "high availability" via hypervisor restarts.
Split-Brain Protection & Node EvictionEngineered quorum weights (pc.weight), automatic eviction of desynchronized nodes, and strict Primary Component gating to eliminate split-brain data divergence.Even-numbered node deployments without garbd; network partitions cause both partitions to lose quorum or allow concurrent uncoordinated writes.Manual intervention required during network splits; accidental split-brain bootstrapping destroys cross-node ACID consistency.Disables quorum safety checks or sets wsrep_cluster_address to single nodes, triggering permanent data corruption.
MaxScale Routing & FailoverProtocol-aware Layer 7 MaxScale routing, automated read/write splitting, causal reads (readwritesplit causal_reads), and transaction replay on node drop.Simple TCP load balancers (HAProxy) without transaction awareness, routing write transactions to desynced read replicas.Application-level connection string hardcoding with manual IP flipping during primary failures, causing 30+ minute outages.Round-robin DNS routing to all nodes indiscriminately, causing deadlocks and write conflict aborts in multi-master mode.
Multi-Region & Cross-DC Disaster RecoveryMulti-site active-passive and active-active topologies pairing intra-DC Galera clustering with inter-DC asynchronous/semi-sync GTID replication and automated DR promotion.Single-region deployments vulnerable to cloud availability zone and regional data center outages.Nightly off-site backups with unverified RTO (>24 hours) and severe transaction data loss (RPO > 4 hours).No cross-region replication or DR strategy; entire business goes dark during provider cloud outages.
State Snapshot Transfer (SST) IsolationNon-blocking Mariabackup-based SST/IST streaming over TLS, dedicated donor node rotation, and traffic draining to prevent donor freeze and flow control stalls.Default rsync or mysqldump SST that locks donor tables read-only, freezing live application traffic across the entire cluster.SST failure loops that saturate server network bandwidth and crash donor nodes under production write load.Manual cold tarball copying between servers with mysql stopped, taking the entire cluster offline for hours.
Chaos Engineering & Resiliency ValidationAvailability targets agreed in your service agreement, verified through fault injection (node crash, packet loss, network partition) and failover drills where your agreement or an HA/DR project includes them.Untested failover procedures that fail in production due to outdated configurations, expired certificates, or stale credentials.Reactive response only after catastrophic outages; no proactive resilience testing or SLA guarantees.Hopes the cluster never fails; first failover test occurs during an unannounced 3 AM production incident.

For procurement and security

NDA first, read-only by default, and written scope

We work alongside your infrastructure and SRE teams. Your team approves every topology change and keeps all configuration manifests, fencing scripts, and drill reports.Raguraman, Head of DBSRE · Allen D, Principal Engineer
  • Mutual NDA
  • Written statement of work
  • Named engineers
  • Least-privilege access
  • NDA before access

    Signed before any diagnostic access. The initial scoping call needs no database credentials.

  • Written agreement

    Target HA topology, RTO/RPO design goals, deliverables, and fees agreed in writing.

  • Least-privilege accounts

    Named accounts accessed through your bastion or VPN with full session audit logging.

  • Runbooks you keep

    Every MaxScale config, my.cnf profile, and switchover drill runbook stays with your team. Meet the JusDB team.

JusDB's security practices are aligned with ISO 27001 and SOC 2 Type II, and JusDB is pursuing both certifications (see Terms, section 12). Read the stated status.

FAQ

Common MariaDB high availability questions

Answers on Galera 4 versus semi-synchronous GTID replication, split-brain fencing, MaxScale failover, and cross-region DR.

Still have a question?

Ask it on a scoping call. No production access needed.

Book a 30-min scoping call (opens Google Calendar in a new tab)

Should we use MariaDB Galera Cluster or semi-synchronous GTID replication for high availability?

Use a 3-node Galera 4 Cluster when your nodes sit in the same region with low network latency (< 2ms RTT) and you want synchronous certification on every member with automatic IST/SST node recovery. Use lossless semi-synchronous GTID replication (rpl_semi_sync_master_wait_point=AFTER_SYNC) with MaxScale when you have heavy single-primary write bursts and want to avoid cluster-wide Galera flow-control coupling.

How do you prevent split-brain in a MariaDB HA cluster?

In Galera, we always deploy an odd number of quorum votes across 3 availability zones (either 3 full data nodes or 2 data nodes plus a garbd arbitrator) so only the majority partition remains Primary. In semi-synchronous GTID topologies, we run redundant MaxScale monitors with cooperative_monitoring_locks and enforce read_only=ON by default in my.cnf.

Does high availability replace the need for mariabackup and point-in-time recovery?

No. Synchronous replication and Galera immediately replicate accidental DROP TABLE or unindexed DELETE statements to every node. Every MariaDB HA architecture must be paired with physical mariabackup snapshots and binary log archiving so you can roll back to the exact second before a logical error.

How does MariaDB MaxScale keep applications connected during a failover?

When a primary fails, MaxScale's mariadbmon or galeramon promotes the healthiest replica, updates routing tables in memory without waiting for DNS TTL expiry, holds incoming queries briefly while the promotion completes, and can replay interrupted idempotent transactions via transaction_replay=true.

Can we stretch a MariaDB HA cluster across two geographic regions?

Yes. For cross-region resilience without penalizing local write latency, we typically deploy a 3-node Galera or semi-sync HA cluster in the primary region and stream asynchronous GTID replication (using distinct gtid_domain_id values) to a standby cluster in the secondary region.

How do you test a MariaDB failover without risking production data?

We rehearse failovers on a staging clone first, verify GTID strict mode and fencing behavior, and then execute planned switchovers (maxctrl call command mariadbmon switchover) during a low-traffic window while recording actual application reconnect latency.

What are your SLA response times if a cluster failover or quorum drop occurs?

24/7 support. SLA response times: P1 – 15 mins | P2 – 30 mins | P3 – 60 mins. Our engineering team is in India (IST, UTC+5:30) and provides 24/7 support.

When should we choose MariaDB High Availability vs Galera Cluster or MaxScale spokes?

Start on this MariaDB High Availability page when you want us to compare and design the right end-to-end topology (semi-sync vs Galera vs RDS Multi-AZ + DR). Visit our dedicated Galera Cluster or MaxScale pages if you already run those specific components and want deep component-level tuning.

MariaDB HA playbooks and comparisons

MariaDB clustering, failover, and replication guides

Practical guides from our engineering team on Galera 4 quorum design, semi-synchronous replication, and MaxScale routing.

Next step

Talk to a MariaDB engineer about your HA topology

Tell us your current MariaDB replication setup, availability zone layout, and RPO/RTO requirements. The first 30-minute call covers your databases, current ownership, and required coverage. No production access is needed. Or request a free audit of one database instance, subject to availability: mutual NDA before read-only access, a prioritized report within one week after access is ready, and no obligation.

NDA before access · read-only by default · written scope first