We are trying to manage our MySql cluster with Apache Helix. We will be running 1 Mysql master and 2 Slaves in each Helix Cluster. We are using Mysql Helix Fullmatrix for this purpose
1) All write goes to master and replicated to slave. Now suppose write occur in master and it is not replicated in slave yet,and on that time the master goes down. Now Helix will choose one of the slave as master.But say when the previous master comes up and become slave,is there a way that transaction that were there in this previous master will sync with current master and other slaves?? Is there a way to ensure that there is No data-loss in this type of scenario??
2) Also if my requirement is such that i always want that when my previous master comes up,it should become the master,not slave.Because we are planning to use high configuration machine for master. So how to do it using Helix?? Or we should keep master and slave with same configuration machines? What is the best approach?
I have seen that there might a way to do it using Customize/user defined Rebalancing algorithm.But Not able to find proper piece of code for getting started with this kind of scenario.
Any help or expert opinion for the above queries will be very helpfull.
Pasting the link to our conversation on github https://github.com/kishoreg/fullmatix/issues/5