What are the drawbacks of using Galera Cluster instead of regular Master/Slave Replication? Galera's 0 slave lag time, Synchronous replication and no Single point of failure seem very appealing then why isn't Galera cluster as common?
Galera Cluster – Drawbacks Compared to Master/Slave Replication
galeramariadbMySQLreplicationxtradb-cluster
Related Question
- Mysql – Using Galera for simple master-master replication
- Galera Cluster – Setting Up with MariaDB 10 and Asynchronous Slave
- Mariadb – what is the right way to restart a mariadb galera cluster
- MySQL 5.5 Replication – How to Replicate to Galera/Percona XtraDB Cluster
- Mariadb – MySQL Master-Slave replication foreign key constraint error
- Mysql – Galera cluster replication stalls when using wsrep_provider_options repl.commit_order=2
- How to Make an Async Slave Track All Nodes in Percona XtraDB Cluster
Best Answer
Because like any other optimization, it doesn't fit every workload.
Galera can get overwhelmed by a high rate of transactions, or when transactions update many rows. It can also make your applications experience delays on COMMIT as the cluster is synced up.
Galera doesn't update other nodes synchronously, either. It just transmits worksets synchronously. In this way, it's a bit like standard replication in semi-synchronous mode. Therefore there's still a small chance of reading stale data from another cluster node. There's an option you can set to force SELECT to wait until the queue of worksets has updated the database, but this means you have delays on SELECT. And even a chance of getting a deadlock on SELECT, which seems counter-intuitive.
Galera is brilliant, but not a one-size-fits-all technology. There are still good reasons to use asynchronous replication.