selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Percona XtraDB Cluster logo

Self-host Percona XtraDB Cluster

Percona-XtraDB-Cluster-9.7.1-1.1

High-availability MySQL clustering with Galera replication

ReleaseOpen SourceOther
Updated2 days ago
LanguageC++
Setup difficultyAdvanced
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))
Docker
percona/percona-xtradb-cluster
Percona XtraDB Cluster screenshot 1

What 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

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

Percona XtraDB Cluster releases & version history

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

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…