What is Percona XtraDB Cluster?
Percona’s open‑source database clustering system. It uses Galera Cluster to cluster MySQL, resulting in a master/master (multi‑master) configuration where every node can both read and write.
Beware of DDL (table changes)
Because PXC is multi‑master, you need to take care when executing DDL. There are two modes for DDL: TOI (Total Order Isolation) and RSU (Rolling Schema Upgrade).
With TOI, the DDL runs on all nodes at the same time, but transactions wait until the DDL finishes. If a table is large, avoid running ALTER TABLE while the service is live.
With RSU, the node executing the DDL temporarily leaves the cluster, runs the DDL, then rejoins and applies the delta. By updating one node at a time you can avoid downtime, but operations such as dropping or changing columns that already took effect elsewhere cannot be performed.
If you need to make disruptive changes without downtime, you can use pt-online-schema-change, though it increases server load.
References
- percona.com
- dev.mysql.com – Online DDL overview
- Trying Percona XtraDB Cluster (Japanese)
- DDL behavior in PXC (Galera Cluster) (Japanese)