Galera Cluster: open-source synchronous multi-master cluster for MariaDB
MariaDB is a community-developed, commercially supported fork of the MySQL relational database management system (RDBMS), intended to remain free and open-source software under the GNU General Public License.
MariaDB intended to maintain high compatibility with MySQL, ensuring a drop-in replacement capability with library binary parity and exact matching with MySQL APIs and commands. However, new features diverge more (ex: XtraDB replaces InnoDB).
MariaDB server can be integrated with Galera Cluster that extends it with the feature of acting as a synchronous multi-master cluster.
Written in: C
, C++
Project Goals
- Galera Cluster for MySQL is a true Multi-Master Cluster based on synchronous replication.
- It's an easy-to-use, high-availability solution, which provides high system up-time, no data loss and scalability for future growth.
- Easy to Use and Deploy.
Project Features
- True Multi-master, Active-Active Cluster Read and write to any node at any time.
- Synchronous Replication No slave lag, no data is lost at node crash.
- Tightly Coupled All nodes hold the same state. No diverged data between nodes allowed.
- Multi-threaded Slave For better performance. For any workload.
- No Master-Slave Failover Operations or Use of VIP.
Project Design and Security
- Hot Standby No downtime during failover (since there is no failover).
- Automatic Node Provisioning No need to manually back up the database and copy it to the new node.
- Transparent to Applications Required no (or minimal changes) to the application.
- No Read and Write Splitting Needed.
Sample Configuration
## Sample Configuration for Galera Cluster over MariaDB @ /etc/my.cnf
[mysqld]
datadir=/var/mysql
socket=/var/run/mysql/mysql.sock
user=mysql
binlog_format=ROW
bind-address=127.0.0.1
default_storage_engine=innodb
innodb_autoinc_lock_mode=2
innodb_flush_log_at_trx_commit=0
innodb_buffer_pool_size=122M
wsrep_provider=/usr/local/lib/galera-cluster/libgalera_smm.so
wsrep_provider_options="gcache.size=300M; gcache.page_size=300M"
wsrep_cluster_name="sample_cluster"
wsrep_cluster_address="gcomm://IP.node1,IP.node2,IP.node3"
wsrep_sst_method=rsync
[mysql_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
## END