Differences
This shows you the differences between two versions of the page.
percona_xtradb_cluster [2012/05/18 18:36] |
percona_xtradb_cluster [2012/05/18 18:36] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Percona XtraDB Cluster ====== | ||
+ | * [[Percona]] | ||
+ | * [[Percona XtraDB Cluster Deployment]] | ||
+ | |||
+ | * [[http://www.percona.com/doc/percona-xtradb-cluster/haproxy.html|Load Balancing with HAProxy]] | ||
+ | |||
+ | === Features === | ||
+ | |||
+ | * Synchronous replication. Transaction either commited on all nodes or none. | ||
+ | * Multi-master replication. You can write to any node. | ||
+ | * Data consistency. No more unsynchronized slaves. | ||
+ | |||
+ | === Configuration === | ||
+ | |||
+ | Add this to ''my.cnf'' for all nodes: | ||
+ | |||
+ | <code> | ||
+ | [mysql] | ||
+ | binlog_format=ROW | ||
+ | wsrep_cluster_name=clustername | ||
+ | wsrep_provider=/usr/lib/libgalera_smm.so | ||
+ | wsrep_slave_threads=2 | ||
+ | wsrep_sst_method=rsync | ||
+ | innodb_locks_unsafe_for_binlog=1 | ||
+ | innodb_autoinc_lock_mode=2 | ||
+ | </code> | ||
+ | |||
+ | In addition, add this to the primary node: | ||
+ | |||
+ | <code> | ||
+ | wsrep_node_name=node1 | ||
+ | wsrep_cluster_address=gcomm:// | ||
+ | </code> | ||
+ | |||
+ | Second node: | ||
+ | |||
+ | <code> | ||
+ | wsrep_node_name=node2 | ||
+ | wsrep_cluster_address=gcomm://node1.server.com | ||
+ | </code> | ||
+ | |||
+ | Third node: | ||
+ | |||
+ | <code> | ||
+ | wsrep_node_name=node2 | ||
+ | wsrep_cluster_address=gcomm://node1.server.com | ||
+ | </code> |