What is Percona XtraDB Cluster?
Percona XtraDB Cluster (PXC) is synchronous, multi-primary MySQL high availability built on Galera. All three nodes accept reads and writes, and a transaction is replicated to every node before commit returns - so there is no replica lag and any single node can fail without data loss.
Clustering is driven entirely by the image’s environment variables: the first node bootstraps the cluster and the others join it, syncing via SST. It is the MySQL-side counterpart to the catalogue’s mariadb-galera template.
It is marked experimental because synchronous clusters need operational care - notably, a full cold start may require bootstrapping the most-advanced node first. For asynchronous primary/replica instead, see mariadb-replication; for a single node, percona-server.
What you get
- Synchronous multi-primary - every node writable
- No replica lag; a node can fail without data loss
- 3 nodes, clustering driven by environment variables
- SST auto-sync for joining nodes
- All internal-only, password-protected
- GPLv2
How it runs on Lyngbak
| Service | Role | Public |
|---|---|---|
pxc-node1 | bootstrap node (:3306) | no (internal) |
pxc-node2/3 | joining nodes (writable) | no (internal) |
Before you deploy
MYSQL_ROOT_PASSWORDroot password (same on all nodes)
MYSQL_PASSWORDapp user password
Sizing and billing
1 GiB per node minimum; raise for real write throughput (every node applies every write). Three nodes, all internal. Experimental: cold-start needs Galera-style care.
A resource is a flat monthly price, with RAM and disk add-ons when the stack needs a little more than a tier, and room for your own apps on a larger one. On Usage Billing each service takes the smallest size that fits it and is billed by the second it runs, so a stopped stack stops costing CPU and RAM. Its 29.3 GiB of volumes cost $0.15 per GiB a month ($4.40/mo) for as long as they exist. One workspace can use both. See pricing
Compared with the managed service
| Service | Plan | Price | Includes |
|---|---|---|---|
| AWS RDS | Multi-AZ | $30/mo | standby instance roughly doubles the bill, smallest size |
| Aiven for MySQL | Business (HA) | $80/mo | smallest HA managed plan/mo |
Managed synchronous HA bills every node/AZ; the 3-node cluster here is one stack, billed for the compute it reserves. Prices from each vendor's pricing page, June 2026.
Run it locally first
The same compose file runs with plain Docker Compose. Clone the template source, copy .env.example to .env, and run docker compose up -d.
Questions
How is this different from primary/replica replication?
PXC is synchronous and multi-primary: writes commit on all nodes together, so there is no replica lag and any node accepts writes. Primary/replica (mariadb-replication) is asynchronous - one writable primary, replicas that can lag and need manual promotion.
PXC or mariadb-galera?
They are the same class of cluster (both Galera-based synchronous multi-primary) on different forks - PXC on Percona/MySQL, mariadb-galera on MariaDB. Pick the one matching the database your app targets.
Why experimental?
Synchronous clusters are sensitive to startup ordering: a full cold start can require bootstrapping the most-advanced node first to avoid split-brain. Everything is wired and validated, but it needs the operational care any Galera cluster does.