Percona XtraDB Cluster
Synchronous multi-primary MySQL HA (Galera) - 3 nodes, every node writable, no replica lag.
One-click deploy, from $25/mo on a Miget plan.
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.
Upstream project: Percona XtraDB Cluster
#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
#topology
| Service | Role | Public |
|---|---|---|
| pxc-node1 | bootstrap node (:3306) | no (internal) |
| pxc-node2/3 | joining nodes (writable) | no (internal) |
#miget sizing
// this stack needs
3 GiB RAM · 30 GB disk · 3 services
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.
Hobby - recommended fit
$25/mo
2 vCPU · 4 GiB · 80 GiB disk
Headroom for your own apps: 8 GiB at $49/mo
Professional - production
$85/mo
4 vCPU · 8 GiB · 50 GiB disk
Dedicated resources, production SLOs - plan details
One Miget plan is a fixed pool of compute - the whole stack (managed databases included) deploys inside it, and anything left over runs your other apps. No per-service or per-seat math.
#vs. the managed service
What the hosted equivalents charge, against the flat Miget plan this stack fits on. Prices as of June 2026, sources linked.
| Service | Plan | Monthly | What you get |
|---|---|---|---|
| Percona XtraDB Cluster on Miget ★ | 4 GiB plan | $25 | this whole stack, flat - no usage meters, and room left for your own apps |
| AWS RDS | Multi-AZ | ~$30 | standby instance roughly doubles the bill, smallest size |
| Aiven for MySQL | Business (HA) | ~$80 | smallest HA managed plan/mo |
Managed synchronous HA bills every node/AZ; the 3-node cluster here is one flat plan.
#vs. other PaaS
Estimated monthly cost of running this exact stack (3 GiB RAM, 30 GB disk, 3 containers) elsewhere, from published June 2026 rates.
| Platform | Est. monthly | Notes |
|---|---|---|
| Miget ★ | $25 flat | compose stacks first-class: one deploy, dedicated vCPU, managed Postgres/Valkey, volumes and TLS all included in the plan |
| Heroku | ~$150 | no volumes; nothing between 1 GB ($50) and 2.5 GB ($250) dynos - 2 GB containers cost far more than shown |
| Render | ~$45 | per-service instances (0.5 GB $7, 2 GB $25) - every container is its own paid service |
| DO App Platform | ~$41 | no persistent volumes - stateful containers need managed DBs/Spaces (base $5 Spaces included here) |
| Railway | ~$35 | usage-based ($10/GB RAM-mo); vCPU billed separately at $20/vCPU-mo on top |
| Fly.io | ~$22 | cheapest sticker price - but burstable shared CPUs (1/16 core; dedicated vCPUs cost ~2-3×), no compose deploys (one app per container, manual wiring), managed DBs billed extra |
Estimates assume RAM fully allocated at published on-demand rates - and sticker price isn't the whole comparison: the cheaper rows buy burstable shared CPUs, per-service wiring instead of a compose deploy, and managed databases billed separately. Heroku and DO App Platform have no persistent volumes at all - stateful stacks like this one need workarounds there.
#deploy it
On Miget
- Create a Compose Stack in app.miget.com pointing at the templates repository
- Set the stack path to
percona-xtradb-cluster -
Set the required variables:
MYSQL_ROOT_PASSWORD, root password (same on all nodes)MYSQL_PASSWORD, app user password
- Deploy. Miget layers
compose.miget.yaml(RAM, privacy, volumes, managed services) automatically
Locally first?
Every template is portable, vanilla Docker Compose - the Miget overrides are ignored locally:
git clone https://github.com/deployable-sh/stacks
cd miget-compose-templates/percona-xtradb-cluster
docker compose up -d Same files, same behavior. The template README covers connection strings and scaling notes.
#faq
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.
Ship Percona XtraDB Cluster today
One compose stack, 3 GiB of RAM, from $25/month flat, and it runs on your laptop with the same files.