Pergunta

I am just a developer, who doesn't have deep knowledge in DBA. So need experts suggestions in this. I have two offline databases in two cities, I want to make a synchronization between two databases using a third database which will be stay alway online in a live server.

My problem is like this, Location A database is in New York. Location B database is in Canada. And they are in local machine, so no connection between them. Now I need to show the changes of Location A's to Location B and Location B's to Location A. Yeah this can be solve by MASTER-MASTER replication. Also i have found a way to solve autoincrement indexes issue, by separating index numbers in different servers.

But I need another live server C where Location A's and Location B's change will reflect. So some users need not to access Location A or Location B for looking into changes. I do not also want's to use RING replication. because if one goes down then rest of the RING will be broken.

In summery I want to make the replication like this

enter image description here

Need help about replication process.

Thanks in advance,

Nixon

Foi útil?

Solução

One solution that could work is a Galera cluster with one node in read-only mode. (See e.g. here for info about geo-distributed Galera cluster.) Galera cluster is a (virtually) synchronous multi-master solution. MariaDB and Percona provide this technology, as does Galera themselves. There is one problem: Since you would be writing to more than one node, there is a higher likelihood of experiencing deadlocks / certification failures, including on commit. (See this article for an explanation.) However, this is something your application could handle if you take care when developing it.

Be sure to review the Galera cluster limitations before you decide on this technology. Some of the most notable requirements are: A Linux OS, it only supports the InnoDB storage engine, and all tables must have an explicit primary key.

MySQL Group Replication is a similar technology, but this wouldn't be suitable for geo-distributed database nodes as in your use-case.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a dba.stackexchange
scroll top