Generated by GPT-5-mini| Galera Cluster | |
|---|---|
| Name | Galera Cluster |
| Developer | Codership |
| Released | 2008 |
| Programming language | C, C++ |
| Operating system | Linux, Solaris, FreeBSD |
| Genre | Database clustering |
| License | GPL, Proprietary |
Galera Cluster Galera Cluster is a synchronous multi-master clustering solution for transactional databases introduced by Codership and widely applied with MySQL, MariaDB, Percona Server for MySQL, PostgreSQL variants and other storage engines. Originally developed to address coordinated replication for online services, the project intersects with infrastructure projects such as Linux, OpenStack, Docker, Kubernetes and orchestration tools like Ansible, Puppet, Chef to deliver fault-tolerant, low-latency transactional platforms. It has been adopted across industries by organizations including Booking.com, Wikipedia, Twitter-scale operations and financial institutions integrating with middleware like HAProxy, Keepalived, Pacemaker.
Galera Cluster provides synchronous replication that allows any node to accept read/write requests while maintaining transactional consistency across a cluster. It targets use cases requiring continuous availability similar to patterns found in High Availability deployments at enterprises such as Amazon Web Services customers, Google Cloud Platform deployments and private clouds built on OpenStack Nova compute. The project has seen usage in environments running Debian, Ubuntu, CentOS, Red Hat Enterprise Linux and virtualization stacks such as VMware ESXi.
The architecture centers on a write-set replication protocol implemented as a library and integrated with database servers and proxies. Core components include the database server binaries (e.g., variants of MySQL), the Galera replication plugin developed by Codership, a certification-based replication layer influenced by concepts from distributed systems research at institutions like MIT and Stanford University, and network transport stacks often tuned with drivers like RDMA or TCP offloads on platforms from vendors such as Intel and Mellanox Technologies. Cluster management commonly integrates with service discovery systems such as Consul, etcd, and orchestration tools like Kubernetes operators. Load balancing and failover are frequently provided by proxies including HAProxy, ProxySQL, and virtual IP managers such as Keepalived and cluster managers like Pacemaker.
Deployments follow patterns used by system administrators familiar with control systems in organizations like NASA and European Space Agency ground segments: prepare OS images, configure fencing, and tune kernel network parameters on distributions like CentOS Stream and Ubuntu LTS. Configuration files include settings for cluster addresses, SST (state snapshot transfer) methods such as rsync or xtrabackup integrated with Percona XtraBackup, and authentication using TLS certificates issued by authorities like Let's Encrypt or enterprise PKI products from DigiCert. Automated deployments leverage CI/CD pipelines influenced by practices at GitHub, GitLab, and Jenkins, while monitoring integrates with observability stacks including Prometheus, Grafana, ELK Stack, and alerting via PagerDuty.
Galera uses synchronous replication with a certification-based protocol: transactions are replicated as write-sets, ordered using a global sequence (views and view IDs), and certified on each node to prevent conflicts — a model drawing on academic work such as the Paxos family and research from Berkeley DB consistency efforts. Methods for state transfer include full SST and incremental IST, often performed using tools like Percona XtraBackup, rsync, or file-system level snapshots on devices like LVM and ZFS. Cluster membership and consensus management interact with quorum rules similar to Raft-based systems, and integration with fencing tools borrows practices used in Corosync and Pacemaker.
Performance characteristics reflect trade-offs between latency and consistency similar to design choices in Spanner and CockroachDB: synchronous certification imposes commit-time coordination overhead but reduces eventual inconsistency windows compared to asynchronous replication like that used in native MySQL replication. Scaling writes requires consideration of conflict rates; workloads with partitioned keys or sharded topologies common to systems used by Facebook or Netflix often achieve better write throughput. Read scaling is commonly achieved via read-only replicas, proxy-based routing in ProxySQL and caching layers like Varnish, Redis, and Memcached. Benchmarking is performed with tools such as sysbench, sysstat, iostat, fio, and load generators from projects like wrk.
Security practices include TLS encryption between nodes, authentication using certificates managed by Vault or enterprise CAs, network segmentation on cloud platforms like AWS VPCs and Azure Virtual Networks, and role-based access control integrated with directory services like LDAP and Active Directory. High availability strategies use diversity of failure domains across data centers (as practiced by Equinix and DigitalOcean), automatic failover via cluster view change, and fencing mechanisms to avoid split-brain informed by standards from organizations such as The Open Group. Backup and disaster recovery follow approaches from EMC and NetApp customers, combining incremental backups, point-in-time recovery and cross-region replication.
Typical use cases include web-scale OLTP systems, e-commerce platforms similar to implementations at Shopify-scale, content management deployments akin to WordPress multisite farms, and multi-region transactional services leveraging cloud providers like AWS, GCP, and Azure. Limitations arise with high-conflict write patterns, long-running transactions, and large schema changes — scenarios where alternative architectures such as sharded clusters used by MongoDB or distributed SQL systems like CockroachDB and Google Spanner may be preferable. Operational complexity is comparable to other clustered databases used by enterprises like Oracle RAC or IBM Db2 pureScale and requires skilled operators familiar with backup strategies, monitoring, and network tuning.
Category:Database clustering