So, as a result I'm investigating how I could implement multi-master replication. Fortunately mySQL has documented some of the source code and hosts this documentation online.
http://dev.mysql.com/sources/doxygen/mysql-5.1/slave_8cc-source.html
There are already references and hooks for multi-master replication in slave.cc
/*
TODO: replace the line below with
list_walk(&master_list, (list_walk_action)end_slave_on_walk,0);
once multi-master code is ready.
*/
Of all the ideas that I have batted around, I've come to a common conclusion, modify mysql source to enable multi-master replication or make an external daemon that would essentially do the same thing.
- It would need to read multiple replication events
- It would need to log these multiple replication events
- It would need a command interface to dynamically add,remove,change hosts
In both cases here are my requirements.
I could either build a method for pushing replication events to a list of hosts, or build a subscribe method which I'm leaning towards.
No comments:
Post a Comment