Overview
A logistics software provider ran its order and tracking database on a three-node MariaDB Galera cluster. Every kernel patch cycle meant restarting each node, and every restart ended in a full state transfer that desynced a donor for hours. Patching had become a weekend project with a real risk of a second node dropping out.
Challenge
The gcache was still at its default size, far smaller than the writesets the cluster produced during a normal maintenance window. A returning node therefore could not get an incremental state transfer and was forced into a full SST, copying the whole data directory from a donor that stopped serving writes at full speed while it did so. Flow control then slowed the application for the duration.
Environment
Three-node MariaDB 10.6 Galera cluster on virtual machines in the customer's own data centre, around 1.2TB of data, fronted by HAProxy.
Approach
AceMQ measured the cluster's real writeset rate across a week instead of sizing from a rule of thumb, then worked out how long a node is realistically away during a patch. The fix was sized against the longest window, with the SST method and donor selection reviewed for the cases where a full transfer is still unavoidable.
Solution
- Measured writeset volume per hour from wsrep status over a full week, including the nightly batch
- Resized gcache.size to cover the longest observed maintenance window with headroom, and confirmed disk space for it
- Switched the SST method to mariadb-backup and set a dedicated donor so a full transfer no longer desynced the busiest node
- Checked ports 4444, 4567 and 4568, credentials and free disk on both sides of the transfer path
- Rewrote the patching runbook to restart one node at a time and wait for it to report Synced before the next
- Added alerts on wsrep_local_state_comment, flow control pause and gcache coverage in minutes
Outcome
The next three patch cycles rejoined every node by incremental state transfer in minutes, with no full SST and no application slowdown. The customer now schedules patching in business hours and owns a runbook that states how long a node can stay away.