Search code examples
mysqlmariadbdatabase-replicationmysql-cluster

Can I implement synchronous and asynchronous replication with the MySQL cluster?


I want to do synchronous and asynchronous replication, synchronize for some databases, and asynchrony for others.

Asynchronous I am doing it through MariaDB, through the traditional system that has replication. But I want to implement synchronous replication also with Mysql / MariaDB. The problem is that I do not know if Mysql Cluster also does that work, or if it is not necessary to have Mysql installed only or MariaDb and only use Mysql Cluster for both.

Thank you.


Solution

  • "MySQL Cluster" has more than one meaning, so I will avoid it.

    "Galera" is the underlying cluster technology in MariaDB, PXC, and (if you do the installation yourself), MySQL.

    Galera provides essentially-synchronous among (typically) 3 nodes. Meanwhile, each node can have any number of asynchronous Slaves hanging off it.

    Also, one Galera cluster can asynchronously replicate to another such cluster. This is sometimes done with a cluster in each of two datacenters.

    Mixing sync and async at the database level is quite unusual, and seems strange. The general principle of Replication is that all servers will have exactly the same (barring delays) data. Please elaborate on what you want to do. Also, think out of the box when it comes to topologies.