Self-host Percona XtraDB Cluster
Percona-XtraDB-Cluster-9.7.1-1.1High-availability MySQL clustering with Galera replication
- Stars
- 390
- RAM
- 3 GB per container (at least 10 GB total for 3 nodes)
- Ports
- 3306 (MySQL client connections), 4567 (Galera replication traffic), 4568 (Incremental State Transfer (IST)), 4444 (State Snapshot Transfer (SST)), 9200 (Percona Monitoring and Management (PMM))
percona/percona-xtradb-clusterWhat is Percona XtraDB Cluster?
Percona XtraDB Cluster is a high-availability database clustering solution for MySQL built on Galera replication technology. It keeps data consistent across nodes through synchronous replication — writes either commit on every node or are rolled back completely. New nodes join and synchronize automatically, and the system uses true parallel replication to scale both reads and writes. Built-in features include PXC Strict Mode to block unsupported features, a ProxySQL configuration utility (proxysql-admin), and automatic SSL encryption setup. The software works with MySQL 8.4 and Percona Server 8.4, so applications need no changes. You can deploy it through official Percona repositories (apt for Debian/Ubuntu, yum/dnf for RHEL/CentOS), binary tarballs, Docker images (percona/percona-xtradb-cluster on Docker Hub), Docker Compose, or by compiling from source. The cluster needs ports 3306 (MySQL), 4567 (Galera replication), 4568 (incremental state transfer), 4444 (full state snapshot transfer), and optionally 9200 for Percona Monitoring and Management. It is licensed under GPLv2 and developed by Percona LLC.
Percona XtraDB Cluster alternatives
Percona Server for MongoDBSelf-hosted, source-available MongoDB drop-in replacement adding enterprise features like LDAP auth, encryption, hot backup, and auditing without vendor lock-in.ComparePercona Server for MongoDB with Percona XtraDB Cluster
MariaDBMariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.CompareMariaDB with Percona XtraDB Cluster
MySQL 5.7Open-source SQL database server you can self-host as MySQL Community via Docker or Oracle packages, with InnoDB ACID transactions, JSON and replication.CompareMySQL 5.7 with Percona XtraDB Cluster
Percona Monitoring and Management (PMM)Self-hosted open-source database observability platform with query analytics, dashboards, advisors, alerting, and backup for major databases.ComparePercona Monitoring and Management (PMM) with Percona XtraDB Cluster
MySQLMySQL Server, the world's most popular open source database, and MySQL Cluster, a real-time, open source transactional database.CompareMySQL with Percona XtraDB Cluster
databasementDatabasement is a self-hosted, open-source database backup manager: register MySQL, PostgreSQL, MongoDB, Redis and more, schedule backups, and restore.Comparedatabasement with Percona XtraDB Cluster
ScyllaDBSelf-hosted ScyllaDB is a distributed NoSQL database compatible with Apache Cassandra's CQL and the Amazon DynamoDB API, built on a shared-nothing, shard-per-core design.CompareScyllaDB with Percona XtraDB Cluster
CouchDBSeamless multi-primary syncing database with an intuitive HTTP/JSON API, designed for reliabilityCompareCouchDB with Percona XtraDB Cluster
Should you self-host Percona XtraDB Cluster?
Percona XtraDB Cluster scores 58/100 on selfhost.directory (how scoring works) and ranks #27 of 38 in Databases. It has 390 GitHub stars.
There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.
Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is Other-licensed and written mostly in C++.
Its closest alternative on selfhost.directory is Redis (86/100, 77 093 stars). It scores higher overall, so compare the two before you pick. See Percona XtraDB Cluster vs Redis side by side.
Features
- Cluster failover
- Data-at-Rest Encryption
- Galera Arbitrator support
- Incremental State Transfer (IST)
- State Snapshot Transfer (SST)
Percona XtraDB Cluster README
For more information about the Percona XtraDB Cluster components and how to use this product, see Percona XtraDB Cluster documentation
FAQ
Does Percona XtraDB Cluster work with regular MySQL replication?
Yes. On the source node, set a unique non-zero server_id, enable binary logging (log_bin), and enable log_replica_updates so cluster-applied writes are recorded in the binary log for downstream replicas.
Is there async mode or only sync commits?
Percona XtraDB Cluster does not support async mode; all commits are synchronous (virtually synchronous — transactions pass certification on all nodes).
What TCP ports are used by Percona XtraDB Cluster?
Default ports: 3306 (MySQL), 4567 (Galera group communication), 4444 (SST), 4568 (IST). All can be changed via configuration options.
How would the quorum mechanism handle split brain?
The quorum mechanism cannot resolve split brain. Minimum recommendation is three nodes. Can allow a node to handle traffic with wsrep_provider_options="pc.ignore_sb = yes" but this risks data inconsistency.
What if a node fails or there is a network issue between nodes?
The quorum mechanism (Dynamic Linear Voting) decides which nodes can accept traffic and shuts down nodes not in the quorum. Failed nodes must copy data from the working cluster when restored.
How does Percona XtraDB Cluster handle big transactions?
It populates write sets in memory before replication, which limits transaction size. There are wsrep variables for maximum row count and write set size to prevent memory exhaustion.
How can I check the Galera node health?
Run SELECT 1 FROM dual; — one row with value 1 means healthy. Unknown error means Galera not connected/synced. Connection error means node offline. Also use the clustercheck script with a dedicated user.
What if a node crashes and InnoDB recovery rolls back some transactions?
When a node crashes, after restarting it will copy the whole dataset from another node if there were changes since the crash.
How do I solve locking issues like auto-increment?
Percona XtraDB Cluster changes auto_increment_offset for each new node. In single-node workloads, locking works like InnoDB. With write load on multiple nodes, it uses optimistic locking and applications may receive lock errors on COMMIT.
How do I report bugs?
Bugs can be reported on the Percona JIRA issue tracker at https://jira.percona.com/projects/PXC/issues. Include error.log files from all nodes.
More in Databases
PgDogSelf-hosted, open-source PostgreSQL proxy written in Rust: transaction-mode connection pooling, read/write load balancing with health checks, and automatic sharding.
portabaseSelf-hosted, open-source database backup tool where agents dump PostgreSQL, MySQL, MongoDB and more on a cron, with GFS retention, S3/SFTP storage and restores.
PostgRESTOpen-source, self-hosted web server that turns an existing PostgreSQL database into a RESTful API, with JWT authentication and authorization done in the database.
questdbSelf-hosted, open-source time-series database with SAMPLE BY and ASOF join SQL, QuestDB Wire Protocol ingestion, PGWire support and a web console.
RedisRedis is a self-hosted, open-source in-memory data structure server used as a database, cache, message broker, and vector query engine with sub-millisecond latency.
ScyllaDBSelf-hosted ScyllaDB is a distributed NoSQL database compatible with Apache Cassandra's CQL and the Amazon DynamoDB API, built on a shared-nothing, shard-per-core design.
SpacetimeDBSpacetimeDB is a source-available relational database that is also the server: your Rust or TypeScript module runs inside it. Self-hosted via Docker.
storStor is a self-hosted, open-source JSON database that exposes a REST-like HTTP API for CRUD operations, using MongoDB as its storage backend and Node.js for the server.
SurrealDBSelf-hosted, source-available Rust database unifying documents, graphs, vectors and time-series, with live queries and row-level permissions in SurrealQL.
tidbSelf-hosted, open-source distributed SQL database with MySQL compatibility, ACID transactions, HTAP analytics and vector search in one engine.
Tile38Self-hosted, open-source in-memory geolocation store and spatial index with real-time geofencing, webhook alerts and a Redis-compatible API.
timeplusSelf-hosted, open-source streaming SQL engine for real-time analytics and AI — a lightweight alternative to ksqlDB and Flink powered by ClickHouse.


0 comments