Free audit

View Audit Scope
MariaDB Galera 4Synchronous multi-primary clustering

MariaDB Galera Cluster Consulting, Tuning & Support

JusDB provides MariaDB Galera Cluster consulting, deployment, and 24/7 support for multi-primary synchronous replication. Database engineers design odd-vote quorum with garbd and pc.weight, size gcache.size for Incremental State Transfers (IST), configure non-blocking mariabackup SST, and tune wsrep_slave_threads and gcs.fc_limit to stop cluster-wide flow-control stalls.

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

Galera 4 engineering focus

Select a cluster subsystem

pc.weight, garbd & grastate.dat recovery

Split-brain guard

3- or 5-vote quorum design across availability zones using full nodes or a lightweight garbd arbitrator, plus safe_to_bootstrap=1 recovery after full cluster power-offs.

Never force bootstrap on an arbitrary node without comparing wsrep_last_committed sequence numbers across all members.

See quorum & recovery specimen

Configured for Galera 4 (libgalera_smm.so) on MariaDB 10.6, 10.11, 11.4, and 12.3 LTS.

Quorum & state transfers
3/5-node quorum, garbd, pc.weight, gcache.size IST, and non-blocking mariabackup SST
Performance & routing
wsrep_slave_threads, gcs.fc_limit, Streaming Replication, and MaxScale galeramon
Response SLA
15 mins for a critical (P1) quorum or flow-control outage, 24/7. See details

Selected clients

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

When teams call us

MariaDB Galera Cluster problems we diagnose and fix

We resolve cluster-wide flow-control freezes, safe_to_bootstrap=0 startup lockouts, multi-hour SST state transfers, certification deadlock storms, and blocking TOI schema changes.

Common MariaDB Galera Cluster symptoms, what is usually happening, and where JusDB engineers start
SymptomWhat is usually happeningWhere we start
wsrep_flow_control_pausedAll cluster nodes pause writes simultaneously during traffic burstsA single node's receive queue (wsrep_local_recv_queue) crosses gcs.fc_limit because wsrep_slave_threads is set to 1 or a backup/analytics query saturates its disk I/O.Check wsrep_flow_control_sent on every node to identify the throttler, raise wsrep_slave_threads based on wsrep_cert_deps_distance, and isolate heavy reads in MaxScale.
safe_to_bootstrap: 0Cluster refuses to start after an AZ power event or simultaneous rebootUnclean shutdown left safe_to_bootstrap: 0 in grastate.dat on all nodes; bootstrapping the wrong node silently discards transactions committed on a more advanced peer.Run mysqld --wsrep-recover on every node to read the highest recovered GTID seqno, set safe_to_bootstrap: 1 on that exact node, and bootstrap with galera_new_cluster.
Full SST on brief restartA 5-minute OS reboot triggers a 2-hour full state transferDefault gcache.size=128M rolled over while the node was restarting, forcing Galera to fall back from Incremental State Transfer (IST) to a full Snapshot State Transfer (SST).Measure peak write-set generation rate in MB/minute, size gcache.size to 4G–16G with gcache.recover=yes, and verify wsrep_sst_method=mariabackup.
wsrep_local_bf_abortsApplication receives unexpected ERROR 1213 deadlocks on COMMITLoad balancers send concurrent writes to all 3 Galera nodes on the same hot rows, causing optimistic certification conflicts and brute-force (BF) transaction aborts.Route all writes to a single elected primary node in MaxScale readwritesplit (or ProxySQL) while using the remaining nodes for read scaling and instant failover.
Non-Primary partitionNodes report WSREP has not yet prepared node for application use (ERROR 1047)A 2-node cluster lost its interconnect, or a WAN network glitch dropped cluster membership below 50% quorum votes, placing nodes into Non-Primary state.Add a 3rd voting member or garbd arbitrator in an independent failure domain, tune evs.keepalive_period and evs.suspect_timeout, and configure pc.recovery=true.
TOI DDL cluster freezeAn ALTER TABLE locks writes across every Galera node at onceDefault wsrep_OSU_method=TOI (Total Order Isolation) replicates the DDL at the start and holds cluster-wide isolation until the table rebuild finishes on all nodes.Use ALGORITHM=INSTANT where supported, run pt-online-schema-change with --max-flow-ctl throttling, or perform Rolling Schema Upgrades (RSU) by draining nodes in MaxScale.

Engineering workflow and SLA response times

How JusDB engineers and supports Galera Clusters

24/7 support. SLA response times: P1 – 15 mins | P2 – 30 mins | P3 – 60 mins.

Four-step Galera Cluster engineering protocol

  1. Audit

    Inspect wsrep status, quorum weights, and gcache

    Read-only check of wsrep_flow_control_paused, cert_deps_distance, and grastate.dat across all nodes.

  2. Tune

    Size gcache.size, wsrep_slave_threads, and SST

    Configure non-blocking mariabackup SST, gcache.recover=yes, and parallel certification appliers.

  3. Route

    Deploy MaxScale galeramon and writer pinning

    Eliminate multi-master certification deadlocks while scaling causal reads across secondary nodes.

  4. Drill

    Rehearse node crash, IST rejoin, and bootstrap

    Verify fast IST recovery, quorum survival, and zero dropped app transactions under load.

SLA response times for Galera 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.

Galera Cluster scope

What does MariaDB Galera Cluster consulting and support cover?

We cover odd-vote quorum design, flow-control and parallel applier tuning, gcache and mariabackup IST/SST setup, MaxScale galeramon routing, online schema changes, and 24/7 quorum recovery.

  • Galera 4 quorum & multi-AZ architecture

    We design 3- and 5-node Galera 4 topologies that survive node and availability zone failures without split-brain.

    • Odd-vote quorum engineering with full nodes, garbd arbitrators, and pc.weight
    • WAN replication segment configuration (gmcast.segment) to reduce cross-AZ traffic

    Galera 4 · garbd · pc.weight · gmcast.segment

    MariaDB high availability
  • Flow control & parallel applier tuning

    Keep write latency flat by tuning Galera's group communication engine and parallel certification appliers.

    • Sizing wsrep_slave_threads against live wsrep_cert_deps_distance
    • Tuning gcs.fc_limit, gcs.fc_factor, and Streaming Replication fragments

    wsrep_slave_threads · gcs.fc_limit · wsrep_trx_fragment_size

    MariaDB performance tuning
  • gcache sizing & mariabackup IST/SST

    Ensure maintenance restarts and node recoveries finish in seconds via IST rather than multi-hour full disk copies.

    • Calculating gcache.size and enabling gcache.recover=yes for fast restarts
    • Non-blocking wsrep_sst_method=mariabackup with dedicated donor selection

    gcache.size · gcache.recover · mariabackup SST · wsrep_sst_donor

  • MaxScale galeramon & causal read routing

    Eliminate multi-master certification deadlocks while scaling read queries safely across synced cluster members.

    • Single-writer pinning via MaxScale readwritesplit with instant failover
    • Session-level causal reads using causal_reads or wsrep_sync_wait=1

    MariaDB MaxScale · galeramon · wsrep_sync_wait · ProxySQL

    MariaDB MaxScale routing
  • Online DDL (TOI vs RSU) & rolling upgrades

    Ship schema changes and MariaDB LTS upgrades across your Galera cluster without freezing production writes.

    • Flow-control-aware pt-online-schema-change and Rolling Schema Upgrade (RSU) runbooks
    • Node-by-node rolling upgrades from MariaDB 10.6 to 10.11, 11.4, or 12.3 LTS

    wsrep_OSU_method · pt-online-schema-change · mariadb-upgrade

    MariaDB migration & upgrades
  • Emergency quorum recovery & 24/7 support

    When a cluster loses quorum or refuses to bootstrap, our on-call Galera engineers recover the highest sequence state safely.

    • P1 response SLA: 15 mins, 24/7
    • Safe grastate.dat seqno comparison, galera_new_cluster bootstrap, andwsrep TLS

    grastate.dat · mysqld --wsrep-recover · galera_new_cluster · socket.ssl

    MariaDB support services

State transfer behavior and written evidence

Why gcache.size determines whether a reboot takes 12 seconds or 2 hours

When a Galera node restarts, it checks if the donor's gcache ring still holds the write-set sequence numbers it missed. If gcache rolled over, Galera wipes the node and runs a full SST.

IST versus full SST during a Galera node maintenance restart

Choose a state to compare default 128M gcache against a properly sized gcache ring.

MaxScale galeramon and Galera donor state transfer

MaxScale pins writes to Node 1 and balances reads across Node 2 and Node 3 with zero certification conflicts.

Primary component · Size = 3
  • Node 1 (AZ-a · Writer)

    Certifies writes · gcache.size=8G · gcache.recover=yes

    Synced · seqno 98,412,110

  • Node 2 (AZ-b · Reader)

    8 parallel wsrep_slave_threads · recv_queue 0.0

    Synced · seqno 98,412,110

  • Node 3 (AZ-c · Reader/Donor)

    Preferred mariabackup SST donor ·fc_paused 0.0

    Synced · seqno 98,412,110

All three nodes hold identical committed state; pinning writes to Node 1 avoids multi-master optimistic lock aborts.

Example production Galera 4 configuration and bootstrap recoverySample deliverable

Finding

Default 128 MB gcache forced 95-minute full SST on every OS patch window

At 45 MB/minute of write-set generation, the default gcache.size=128M rolled over in under 3 minutes. Sizing gcache.size=8G with gcache.recover=yes provided a 3-hour IST window and cut rolling patch rejoin times from 95 minutes to 11 seconds.

Node rejoin duration95m → 11s (IST)
IST retention window2.8m → 180m

1. Production Galera 4 wsrep configuration in /etc/my.cnf.d/galera.cnf

[galera]
wsrep_on                       = ON
wsrep_provider                 = /usr/lib64/galera-4/libgalera_smm.so
wsrep_cluster_name             = "jusdb_prod_galera"
wsrep_cluster_address          = "gcomm://10.20.1.11,10.20.2.12,10.20.3.13"
wsrep_sst_method               = mariabackup
wsrep_slave_threads            = 8
wsrep_trx_fragment_size        = 1048576
wsrep_trx_fragment_unit        = bytes
wsrep_provider_options         = "gcache.size=8G;gcache.recover=yes;gcs.fc_limit=128;gcs.fc_factor=0.8;pc.weight=1"

2. Safe sequence recovery before bootstrapping a stopped cluster

# Run on all nodes to find the highest committed GTID seqno:
mysqld --wsrep-recover
grep -E "seqno|safe_to_bootstrap" /var/lib/mysql/grastate.dat
# On the single node with the highest seqno, set safe_to_bootstrap: 1 and run:
galera_new_cluster

Your team and ours

What cloud infrastructure leaves to your team on Galera Cluster

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 running MariaDB Galera Cluster across cloud infrastructure versus your own servers
AreaManaged RDS vs Cloud IaaSLinux VMs or Kubernetes with JusDB
Multi-AZ Linux VMs, low-latency VPC networking, and NVMe disksStandard Amazon RDS does not offer multi-node Galera Cluster.Your cloud or platform team, sized across 3 AZs with JusDB.
Galera 4 quorum weights, garbd arbitrator, and bootstrap recoveryNot available on RDS; on SkySQL or VMs, quorum design and split-brain recovery require Galera specialists.Engineered and supported 24/7.
gcache.size, mariabackup SST, and flow-control tuningDefault package configs ship with gcache.size=128M and wsrep_slave_threads=1.Calculated and tuned by JusDB based on your write-set throughput.
MaxScale readwritesplit and multi-master deadlock preventionRequires external proxy architecture so applications do not collide on hot rows.Deployed and managed by JusDB with MaxScale galeramon or ProxySQL.
Online schema changes (TOI vs RSU) and rolling LTS upgradesRunning unguarded DDL in Galera freezes every node via Total Order Isolation.Executed safely by JusDB using throttled pt-osc or Rolling Schema Upgrades.

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 Galera 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

Related MariaDB & Galera capabilities

Compare options

How JusDB Galera Cluster engineering compares with default installs and async setups

Compare a tuned, MaxScale-fronted Galera 4 topology against stock Galera package defaults, standard async replication, or vendor ticket queues.

Evaluation Vector
JusDB DBRE
In-House DBALegacy AgencyDeveloper Generalist
Virtually Synchronous Multi-Primary Replication & CertificationConfigures certification-based replication with wsrep_certify_nonPK=ON, tuned wsrep_slave_threads aligned to CPU cores, and deterministic primary key range conflict detection for true RPO=0 synchronous clustering.Runs default single wsrep_slave_thread and ignores write conflicts, causing write-set certification backlogs and app-level transaction deadlocks.Treats Galera like standard async MySQL master-slave; uses raw multi-master writes without conflict-aware transaction retries, causing data rollbacks.Deploys multi-master without understanding optimistic locking or write-set certification, generating unhandled wsrep certification aborts.
Flow Control (gcs.fc_limit) & Slave Queue Memory SizingCalibrates gcs.fc_limit, gcs.fc_factor, and wsrep_local_recv_queue sizing with proactive telemetry to eliminate flow control pauses (wsrep_flow_control_paused=0) under write spikes.Leaves gcs.fc_limit at default (16), causing a single slow disk or donor node to trigger cluster-wide write freezes during batch imports.Blindly increases gcs.fc_limit to extreme values, causing runaway slave queue memory consumption and out-of-memory kernel panics.Does not monitor wsrep_flow_control_paused; misattributes cluster-wide transaction stalls to network outages or web application bugs.
State Transfer Optimization (SST via mariabackup vs IST)Hardens mariabackup non-blocking SST with dedicated replication VLANs and sizes gcache.size so maintenance restarts can rejoin via fast Incremental State Transfers (IST) instead of full SST.Relies on blocking rsync SST or undersized gcache (128MB), forcing heavy full SST copies that evict donor nodes from serving live production traffic.Uses deprecated mysqldump SST, taking global table locks on donor nodes and crashing production application response times.Lets joiner nodes crash due to timeout during large SST transfers without configuring stream compression or parallel donor threads.
Split-Brain Protection & Galera Arbitrator (garbd) QuorumDeploys odd-numbered voting topologies across availability zones using Galera Arbitrator (garbd) with evs.suspect_timeout and evs.inactive_timeout hardened for cloud networks.Deploys an even 2-node cluster without an arbiter; a transient network partition triggers split-brain and non-primary component isolation on both nodes.Relies on manual wsrep_cluster_address resets or unsafe pc.ignore_sb=TRUE, risking silent data divergences across divergent partitions.Ignores quorum requirements entirely; leaves partitioned nodes running in non-primary state unable to accept write operations.
MaxScale Read/Write Splitting & Causal Consistency RoutingIntegrates MaxScale with Galera-Monitor, causal_reads=true, and master_failure_mode=fail_on_write, preventing stale reads after writes and enabling transparent failover.Uses basic round-robin HAProxy without wsrep status checks, routing application write traffic to non-primary or desynchronized joiner nodes.Hardcodes node IPs directly in application connection pools, requiring manual configuration edits and service restarts during node outages.Connects applications directly to random Galera nodes without proxy layers, causing frequent cross-node write lock deadlocks and timeouts.
Disaster Recovery & Automated Primary Component RebootstrapArchitects automated cluster bootstrap recovery using grastate.dat safe_to_bootstrap discovery, coordinated binary log sequence analysis, and PITR via encrypted mariadb-backup.Manually edits safe_to_bootstrap: 1 on a random node during power outages without seqno verification, causing silent data loss of recent commits.Attempts mysqld_safe --wsrep-new-cluster on an outdated node, overwriting the true latest state and corrupting cluster GTID sequence tracking.Restores stale logical SQL dumps after cluster crashes instead of safely re-bootstrapping existing Galera storage engines.

For procurement and security

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

We work alongside your platform and SRE teams. Your team approves production maintenance windows and keeps every galera.cnf profile, MaxScale config, and bootstrap recovery runbook.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 cluster credentials.

  • Written agreement

    Covered Galera clusters, deliverables, SLA response times, and fees agreed in writing.

  • Least-privilege accounts

    Named read-only accounts by default, accessed through your bastion or VPN with session logging.

  • Runbooks you keep

    Every wsrep_provider_options profile, SST configuration, and recovery procedure 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 Galera Cluster questions

Answers on 3-node quorum, writer pinning, flow-control tuning, IST vs mariabackup SST, and safe_to_bootstrap recovery.

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)

How many nodes do we need in a production MariaDB Galera Cluster?

A production Galera Cluster requires a minimum of 3 voting members across separate failure domains so the cluster can tolerate a node or availability zone loss and still maintain a >50% quorum majority. This can be 3 full MariaDB data nodes, or 2 full data nodes plus a lightweight garbd (Galera Arbitrator) process in a third zone.

Why should we pin writes to a single Galera node if Galera is multi-master?

Although every Galera node can accept writes, Galera uses optimistic concurrency control: transactions execute locally and certify against the cluster at COMMIT time. If two nodes update the same row concurrently, one transaction is aborted with a deadlock (ERROR 1213). Routing writes to one primary node via MaxScale readwritesplit eliminates cross-node certification conflicts while keeping the other nodes hot for reads and instant failover.

What causes Galera flow-control pauses and how do you fix them?

Flow control triggers when any node's incoming write-set queue (wsrep_local_recv_queue) exceeds gcs.fc_limit, causing that node to broadcast FC_PAUSE and halt writes cluster-wide. We fix it by increasing wsrep_slave_threads to match wsrep_cert_deps_distance, tuning InnoDB flushing, isolating backup donors, and adjusting gcs.fc_limit and gcs.fc_factor.

What is the difference between IST and SST in Galera Cluster?

Snapshot State Transfer (SST) copies the entire database directory from a donor using mariabackup when a new node joins or falls too far behind. Incremental State Transfer (IST) streams only the missing write-sets from the donor's circular gcache buffer. By sizing gcache.size to 4G–16G and setting gcache.recover=yes, nodes that restart for maintenance rejoin in seconds via IST.

How do you recover a Galera Cluster when all nodes show safe_to_bootstrap: 0?

When a cluster shuts down uncleanly, every node marks safe_to_bootstrap: 0 in /var/lib/mysql/grastate.dat. Our engineers run mysqld --wsrep-recover on each node to inspect the exact InnoDB-recovered GTID sequence number (seqno), promote the node with the highest seqno to safe_to_bootstrap: 1, bootstrap it with galera_new_cluster, and rejoin the remaining nodes via IST.

How do you run ALTER TABLE schema changes on a Galera Cluster without freezing writes?

Galera's default Total Order Isolation (TOI) blocks writes on every node for the duration of the DDL. For instant metadata changes we use ALGORITHM=INSTANT; for large table rebuilds we either run pt-online-schema-change with --max-flow-ctl throttling or execute a Rolling Schema Upgrade (RSU) by draining one node at a time in MaxScale.

What are your SLA response times for a P1 Galera quorum loss or stall?

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.

Can you run MariaDB Galera Cluster on Kubernetes?

Yes. We deploy and manage Galera 4 clusters on Kubernetes using mariadb-operator CRDs, configured with PodDisruptionBudgets, pod anti-affinity across worker zones, low-latency CSI block storage, and automated quorum recovery.

Galera Cluster playbooks and comparisons

Galera production guides, wsrep tuning, and comparisons

Practical guides from our engineering team on Galera 4 production operations, Group Replication comparisons, and MaxScale routing.

Next step

Talk to a Galera engineer about your cluster

Tell us your MariaDB version, node count, availability zone layout, and any flow-control or SST issues you are facing. 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