This is my current setup for testing replication.
I have 3 VMs with the same config
- CentOS 6.5
- MySQL 5.1
- Tungsten replicator
The scenario that I need to implement is as follows
Host1(Main db server) ---- Host2...Hostn ( remote sites db server)
In my case Host1 is server and Host2 and Host3 are the "remote" sites.
The topology to be implemented is ALL_MASTERS.
This is required because all hosts are on read-write mode. So data needs to be replicated on all hosts. But in some cases only specific data needs to be replicated on the remote sites and data on all sites needs to be replicated on Host1. As far as I can see , I have only two options.
- Use triggers on remote hosts
- Use separate tables for separate sites with the same structure ( probably using suffixes in table names) and have triggers only on
Host1.
If I go with Option 1, data which is not supposed to be on the specific data. But I would have an issue with sync because its an ALL_MASTERS topology, therefore the same data would be deleted on Host1.
If I go with Option 2, this would solve the issue of specific data.But unfortunately in my case, the remote sites are replicating all the tables even though I specified the replicate-wild-do-table option in each of the 2 remote sites.
Both ways, I will face issues.
It would be great if someone could help me.
Aucun commentaire:
Enregistrer un commentaire